-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Social Login (Facebook) through user pool, hosted, ui, invalid_grant error. #3185
Comments
Hi @calboru
(According to TOKEN Endpoint docs) Do you see duplicate/multiple calls to the token endpoint in the network inspector? |
Hi Manuel, |
invalid_grant ; Zone ; Task Promise.then ; Value: Error: invalid_grant ... zone.jsIt seems you are calling two times, in you code. you set at begining the imports
this is all.. but in some tutorials give an extra step (not necesary).. ej.
This is not necesary because your "import amplify from './aws-exports';" has the same parameters, REVIEW |
@nandoise, I too ran into this issue. Removing the manual config from the documentation example fixed the 'invalid_grant' error. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
Write Amplify.configure(awsConfig) after your initial component mounted. This actually solved my issue. |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Followings are my settings. When I try to test social login I always get invalid_grant error.
WHEN I INVOKE:
federatedSignIn() {
const provider: FederatedSignInOptionsCustom = { customProvider: 'Facebook' };
return from(this.auth.federatedSignIn(provider));
}
OR TEST URL: https://xxxx.auth.us-east-2.amazoncognito.com/login?response_type=code&client_id=xxxx&redirect_uri=https://localhost:4200
Error happens after PKCE event: https://localhost:4200/?code=16c65151-7f92-4611-99c3-d872a44cacb6
MY SETTINGS AS FOLLOW:
const awsmobile = {
aws_project_region: 'us-east-2',
aws_cognito_region: 'us-east-2',
aws_user_pools_id: 'us-east-2_XXX',
aws_user_pools_web_client_id: 'XXXXX',
Auth: {
oauth: {
domain: 'XXX.auth.us-east-2.amazoncognito.com',
redirectSignIn: 'https://localhost:4200',
redirectSignOut: 'https://localhost:4200',
mandatorySignIn: true,
scope: ['public_profile', 'openid', 'email', 'first_name', 'last_name'],
responseType: 'code'
}
}
};
The text was updated successfully, but these errors were encountered: