Last active
March 29, 2021 13:23
-
-
Save zackbraksa/af83dc95aec2079873734d602146f867 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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