简体   繁体   中英

Use Twitter as Identity Provider in AWS Cognito

I'm want to implement social-sign in with twitter in Cognito and test it using the build in UI page but I cannot find any relevant guidelines to do this. My use case is to authenticate user with twitter credentials and obtain user information like firstname, lastname, email, country.

I've found this relatively old post: https://aws.amazon.com/blogs/mobile/announcing-twitter-and-digits-support-for-amazon-cognito/ But it seems that the native support for twitter was removed from Cognito? Because in Cognito under Identity Providers there is no twitter option. Does anyone know what happened regarding this?

From what I've found in the twitter documentation regarding using twitter as a IdP it seems that it is not using OpenID Connect specification but some OAuth1 custom extension (I'm not sure if what I stated is correct): https://developer.twitter.com/en/docs/twitter-for-websites/log-in-with-twitter/guides/implementing-sign-in-with-twitter But I did not find any OpenId Connect endpoints for twitter like the ones from Microsoft for example ( https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration )

Is there any way that I can implement sign-in with twitter in cognito? And also to test this using the cognito build-in login UI?

As far as I know Twitter's current sign-in mechanism is based on OAuth 1.0 which is not OpenID Connect. So I would suggest you building some custom Auth Mechanism using OpenID (there might be already open source solutions), link it to Cognito and inside this custom auth app you authenticate with Twitter OAuth 1.0. So in other words, build a bridge between Cognito and Twitter via custom OpenID app.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM