Skip to content

Instantly share code, notes, and snippets.

@luandevpro
Created October 13, 2019 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luandevpro/30cd78e7f0d4c2c8fb094ff2692c257f to your computer and use it in GitHub Desktop.
Save luandevpro/30cd78e7f0d4c2c8fb094ff2692c257f to your computer and use it in GitHub Desktop.
...
import { auth, providerGoogle } from '../lib/firebase';
function Index() {
...
const handleAuth = () => {
auth.signInWithPopup(providerGoogle).then((result) => {
console.log(result);
});
};
return (
<div className="container mt-5">
<button type="button" className="mt-5 mb-5 btn btn-primary" onClick={handleAuth}>
Google
</button>
...
</div>
);
}
export default withRedux(Index);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment