dabit3 / amplify-auth-demo

Demo of OAuth + Username / Password authentication in AWS Amplify
https://www.amplifyauth.dev/
112 stars 29 forks source link

Typescript federatedSignIn Error #7

Open josephgoksu opened 4 years ago

josephgoksu commented 4 years ago

Example Code and Possible Error

<button
     type="button"
     onClick={() => Auth.federatedSignIn({provider: 'Google'})}>
     Sign In with Google
</button>

How to fix

import { CognitoHostedUIIdentityProvider } from '@aws-amplify/auth/lib/types';

<button
     type="button"
     onClick={() => Auth.federatedSignIn({provider: CognitoHostedUIIdentityProvider.Google})}>
     Sign In with Google
</button>
jgiunta1 commented 3 years ago

For some reason this isn't working for facebook. I'm getting a 404 and its calling the identity pool endpoint instead of the user pool endpoint.