amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Support Google login_hint for auth [react]

Open revmischa opened this issue 4 years ago • 10 comments

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?

  • [ ] 👋 I may be able to implement this feature request
  • [ ] ⚠️ This feature might incur a breaking change

revmischa avatar Sep 27 '21 07:09 revmischa

Is there any action to include this feature?

debersonpaula avatar Aug 18 '22 17:08 debersonpaula

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 avatar Feb 07 '23 22:02 cwomack

@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!

cwomack avatar Feb 17 '23 17:02 cwomack

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.

pjanaya avatar Feb 17 '23 17:02 pjanaya

@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.

cwomack avatar Feb 24 '23 18:02 cwomack

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

szliuxf avatar Jul 11 '23 16:07 szliuxf

@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?

cwomack avatar Aug 02 '23 18:08 cwomack

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

dnoji avatar Sep 22 '23 03:09 dnoji

Anything update news ? @cwomack

natuan62 avatar Jun 14 '24 01:06 natuan62

Any update on the subject?

huski1017 avatar Jun 21 '24 08:06 huski1017

This isn't google specific though. Most providers do support to pass in the user as login_hint so the users can log in skipping one extra step.

For some reason, this isn't supported by Amazon and it's not implemented in amplify... At least now it seems like cognito supports it (this wasn't the case some years ago) https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html

Could we get an update on this?

Alevale avatar Dec 16 '24 17:12 Alevale

Hi @Alevale This login_hint param is working now on google login with amplify ? Thank you!

natuan62 avatar Dec 17 '24 01:12 natuan62

Hi @Alevale This login_hint param is working now on google login with amplify ? Thank you!

@natuan62 As far as I see in the implementation I don't find any particular difference when it comes to Google or other providers, and since it's not implemented in the amplify library for any provider I would assume it's also not for google

Alevale avatar Dec 17 '24 11:12 Alevale

@natuan62 I've created https://github.com/aws-amplify/amplify-js/pull/14089 to add support for it. When it gets merged there should be support for it.

Alevale avatar Jan 06 '25 09:01 Alevale

@Alevale Thank you for this MR. Hope aws team will merged it soon. ~ 3 weeks from MR created and serveral years from issue created

natuan62 avatar Jan 06 '25 09:01 natuan62