question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Auth.federatedSignin - Custom domain gives "this._oAuthHandler is undefined", amplifyapp.com works

See original GitHub issue

AppId: 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:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ojemuyiwacommented, Jul 29, 2020

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…

1reaction
ojemuyiwacommented, Jul 29, 2020

Similar issues: upgraded aws-amplify: ^3.0.22 and aws-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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unhandled Rejection (TypeError): this._oAuthHandler is ...
I am trying to run Amplify Authentication within my TypeScript/React web application. I've had it working for weeks, but am now getting ...
Read more >
How to use the @aws-amplify/auth.federatedSignIn function in ...
To help you get started, we've selected a few @aws-amplify/auth.federatedSignIn examples, based on popular ways it is used in public projects.
Read more >
Authentication - Social sign-in (OAuth) - JavaScript
OAuth 2.0 is the common Authorization framework used by web and mobile applications for getting access to user information ("scopes") in a limited...
Read more >
How to use a custom domain of Cognito hosted UI with Amplify
... I specified custom domain in Cognito, deactivated default URL of Cognito hosted UI and call Auth.federatedSignIn() in my react app with…
Read more >
The Complete Guide to User Authentication with the Amplify ...
Any update on the React Native version ? Been trying to make it work but stuck at when the hosted UI (using withOAuth...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found