Skip to content

Instantly share code, notes, and snippets.

@velotiotech
Created September 8, 2021 09:47
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 velotiotech/7f6dc48f9328c8a4589882de62630073 to your computer and use it in GitHub Desktop.
Save velotiotech/7f6dc48f9328c8a4589882de62630073 to your computer and use it in GitHub Desktop.
import Amplify, {Auth} from 'aws-amplify';
import awsconfig from './aws-config';
Amplify.configure(awsconfig);
//once the amplify is configured you can use below call with onClick event of buttons or any other visual component to sign in.
//Example
<Button startIcon={<img alt="Sigin in With Google" src={logo} />} fullWidth variant="outlined" color="primary" onClick={() => Auth.federatedSignIn({provider: 'Google'})}>
Sign in with Google
</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment