Skip to content

Instantly share code, notes, and snippets.

Created September 8, 2021 09:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
import Amplify, {Auth} from 'aws-amplify';
import awsconfig from './aws-config';
//once the amplify is configured you can use below call with onClick event of buttons or any other visual component to sign in.
<Button startIcon={<img alt="Sigin in With Google" src={logo} />} fullWidth variant="outlined" color="primary" onClick={() => Auth.federatedSignIn({provider: 'Google'})}>
Sign in with Google
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment