aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.41k stars 2.11k forks source link

Support Google login_hint for auth [react] #8951

Open revmischa opened 2 years ago

revmischa commented 2 years ago

Is this related to a new or existing framework?

React

Is this related to a new or existing API?

Authentication

Is this related to another service?

No response

Describe the feature you'd like to request

When calling Auth.federatedSignIn({ provider: CognitoHostedUIIdentityProvider.Google })} I'd like to be able to provide the login_hint parameter to Google since I know what email they should use when they accept an invite from another user.

Describe the solution you'd like

Perhaps something like upstream params that Auth0 provides https://auth0.com/docs/connections/pass-parameters-to-idps#dynamic-parameters

Describe alternatives you've considered

Auth0 https://auth0.com/docs/connections/pass-parameters-to-idps#dynamic-parameters

Additional context

No response

Is this something that you'd be interested in working on?

debersonpaula commented 2 years ago

Is there any action to include this feature?

cwomack commented 1 year ago

Hello @revmischa and thanks for submitting this feature request. Hoping to get some clarity on what the core functionality should be after looking into the OAuth doc provided above.

Is the intent to pass in something like "login_hint" as an optional parameter to then enable additional functionality/auth flow on the social IDP side (i.e. Google Authentication)?

cwomack commented 1 year ago

@debersonpaula, maybe you can help add some clarity about what's intended for this feature request. Could you please take a look at the above comment/question? Thanks!

pjanaya commented 1 year ago

I’m also interested in this. I came across this tweet that I think explains the issue and solution pretty good:

Twitter thread

@cwomack Basically, the idea is to propose to the user which login provider and user they used last time. Apparently, it's also supported by the OAuth2 protocol. More info in the Google docs.

cwomack commented 1 year ago

@pjanaya, appreciate the follow up and additional context! We've added this to our list of feature requests to be considered for Auth and will update this issue with any progress.

szliuxf commented 1 year ago

How is this feature going? Is this only going to support google? How about other auth providers?

cwomack commented 1 year ago

@szliuxf, we don't have any updates at this time regarding this feature request. I can updates the notes on our side to consider support for other auth providers as well. Are there any in particular you're looking for?

dnoji commented 11 months ago

@cwomack Any update on this one? I'm looking to do this for auth0 as well.

natuan62 commented 2 months ago

Anything update news ? @cwomack

huski1017 commented 2 months ago

Any update on the subject?