20

I'm trying to add LinkedIn login to my react app that using Amazon Cognito, I did everything like explained here and yes it works but I'm not using Amazon Cognito hosted UI and I don't want my user to get redirected to Auth0 site to login with LinkedIn...

Is there any way to implement LinkedIn Cognito login\signup without getting redirected to Cognito\Auth0?

Or maybe there is already a better way to implement this?

ronara
  • 336
  • 11
  • 26

2 Answers2

6

Official answer from amazon support:

After investigating this further, and reaching out to the Cognito Team, I can confirm that the intended functionality is not currently possible with Cognito. The required State parameter is stripped from requests when added manually, preventing the flow from being bypassed like this. After researching this further it looks like there is already a feature request for providing a workaround and I have noted your desire for this functionality as well.

Unfortunately at this time I can't confirm any ETA regarding this request.

ronara
  • 336
  • 11
  • 26
1

It's explained as impossible without Auth0. Good question. LinkedIn's OpenID is just different than FB and Google's public login which Cognito accepts right now. I don't have code that authorizes a Cognito Pool with LinkedIn's OpenID. I believe I found the document that will explain what's missing in LinkedIn's OpenID in detail: How do I set up LinkedIn as a social identity provider in an Amazon Cognito user pool? I wouldn't throw away the Sign in with LinkedIn OpenID service in your app. It's just that Auth0 is absolutely necessary unless LinkedIn changes its OpenID.

starpebble
  • 504
  • 3
  • 7
  • I know that Auth0 is necessary. The only problem I have is that I cant do the auth without the Auth0 login screen. I want my users to stay in my app and get redirect to LinkedIn only not to Auth0 and then to LinkedIn – ronara Mar 30 '20 at 19:24
  • Sounds a lot simpler for the user to login to LinkedIn alone and skip Auth0. I hope somebody finds code to do that I don't have it. – starpebble Mar 30 '20 at 20:10
  • Do you end up paying twice? Ie both Auth0 and cognito MAUs? – Adam Mills Feb 18 '22 at 23:25