Skip to content

Instantly share code, notes, and snippets.

@zackbraksa
Last active March 29, 2021 13:23
Show Gist options
  • Save zackbraksa/af83dc95aec2079873734d602146f867 to your computer and use it in GitHub Desktop.
Save zackbraksa/af83dc95aec2079873734d602146f867 to your computer and use it in GitHub Desktop.
import React from 'react';
import { auth } from './firebase';
function Login() {
const login = async () => {
const provider = new auth.GoogleAuthProvider();
try {
await auth().signInWithPopup(provider);
} catch (e) {}
};
return <button onClick={login}>login</button>;
}
export default Login;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment