Auth.federatedSignin - Custom domain gives "this._oAuthHandler is undefined", amplifyapp.com works
See original GitHub issueAppId: d37jgjg13juglg
Describe the bug A clear and concise description of what the bug is.
Auth is working when I access the app via it’s amplifyapp.com Domain. Yesterday (July 26, 2020) I added the first custom domain. On the custom domain, if the page loads at all, initiating a federated auth produces a JavaScript error.
There is currently also a problem with the Custom Domain and Cloudfront. It sporadically works, then either the Custom domain Server (pointed to via CNAME) does not respond at all anymore and Firefox says We can’t connect to the server at [domain]
or the page remains empty whiteness. Maybe it’s related, even?
To Reproduce Steps to reproduce the behavior:
It is a Nuxt app.
@click on the “Login with Google” button I am calling
Auth.federatedSignIn({ provider: 'Google' });
In the Nuxt plugin preparing amplify, I am following https://github.com/aws-amplify/amplify-cli/issues/2792#issuecomment-575406663 And also found this helpful https://stackoverflow.com/questions/52209553/how-can-i-get-started-with-integrating-aws-amplify-to-a-nuxt-js-project/60783792#60783792
Expected behavior A clear and concise description of what you expected to happen.
Expecting a successful Login with Google on the custom domain, just like on the amplifyapp.com Domain.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Ah I see. After hours of trial and error i’ve just noticed mine works using
import { CognitoHostedUIIdentityProvider } from "@aws-amplify/auth/lib-esm/types";
. I have no idea why though hmmm…Similar issues: upgraded
aws-amplify
:^3.0.22
andaws-sdk
:^2.721.0
and the following breaking changes occur:import { CognitoHostedUIIdentityProvider } from "@aws-amplify/auth/lib/types";
Auth.federatedSignIn({ provider: CognitoHostedUIIdentityProvider.Cognito });
CognitoHostedUIIdentityProvider is always undefined. on Angular 10.0.5