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

Auth - signInWithRedirect/federatedSignIn - add additional validationData

Open pechisworks opened this issue 4 years ago • 28 comments

Is your feature request related to a problem? Please describe. I would like to add some validationData on Auth.federatedSignIn() so that i can access this data on some Cognito triggers like Pre authentication or Post authentication.

pechisworks avatar Apr 23 '20 19:04 pechisworks

@pechisworks why you cannot use Auth.signIn(...) instead of Auth.federatedSign(..), what is your use case?

elorzafe avatar Apr 24 '20 20:04 elorzafe

Hi @elorzafe. I want to Sign in with my Facebook or Google-Account. I want to pass some additional data to the Post authentication trigger, in my use case I want to pass the IAM identityId so I can take over some data from the unauthenticated IAM user. (The IAM user can do some data manipulations, and when he signs up/in, this data should be taken over to the new user)

Is it possible to sign in with a Facebook Account with Auth.signIn(...)?

pechisworks avatar Apr 26 '20 17:04 pechisworks

@elorzafe is this possible? can we pass validationData to federatedSignIn?

For my particular use case there is a precursor step that they need to take before they can sign in using facebook, so I pass the result of that step in the validationData to ensure that the user is valid

alichherawalla avatar Aug 31 '20 11:08 alichherawalla

@elorzafe any update on the above?

alichherawalla avatar Sep 16 '20 04:09 alichherawalla

+1 Have the same usecase as @alichherawalla. Would appreciate any update.

tobiasriemenschneider avatar Mar 13 '21 17:03 tobiasriemenschneider

+1

We are facing the same issue, any update ?

takarabt avatar Apr 30 '21 08:04 takarabt

I'm in the same problem, it is vital for me to pass validationData for a function that runs in pre-signup and I also have federated users from Facebook and Google.

DeniferSantiago avatar May 15 '21 02:05 DeniferSantiago

This is key to being able to validate a CAPTCHA in the Pre authentication trigger Lambda.

gabrielmaldi avatar Jun 09 '21 04:06 gabrielmaldi

Is there any update on this?

danielvouch avatar Jun 28 '21 03:06 danielvouch

Is there any update on this?

mohannad-musleh avatar Mar 02 '22 11:03 mohannad-musleh

It's been almost two years since this ticket was open, it's really a very important feature to build production-ready sign-in/signup pages using a CAPTCHA. That will be great to get at least feedback whether you are planning to implement it or not, this will give us the opportunity to think about other solutions like AWS WAF CAPTCHA (not cost-effective for our use case) or move to another IDP.

atakarabt avatar Mar 02 '22 11:03 atakarabt

Is there any update on this? Why is this being completely ignored?

SimonHoiberg avatar Apr 19 '22 11:04 SimonHoiberg

@SimonHoiberg I am very sorry I forgot to answer this issue.

I was looking on Cognito documentation and it seems is not possible to send validationData or clientMetadata when using HostedUI.

I will reach out Cognito team about this problem

elorzafe avatar Apr 19 '22 21:04 elorzafe

FYI: @elorzafe

Even for the clients which are not HostedUI based the validationData and clientMetadata not working for federatedSignIn/federatedSignUo

atakarabt avatar Apr 20 '22 07:04 atakarabt

Stuck on this issue, too

hackmajoris avatar Jul 19 '22 18:07 hackmajoris

Hi, any update on this? Come on man we need a solution for this.

parthNJ avatar Mar 16 '23 03:03 parthNJ

Hi @parthNJ, unfortunately we are blocked on delivering this feature since we need changes to happen first at the Cognito side. We are in communication with them about these blockers!

abdallahshaban557 avatar Mar 16 '23 15:03 abdallahshaban557

@abdallahshaban557 do you have any news from Cognito?

wookieJ avatar Apr 20 '23 07:04 wookieJ

Hi @wookieJ - unfortunately, not yet. Can you please provide us with the use case that you want to unlock by passing the validationData?

abdallahshaban557 avatar Apr 20 '23 15:04 abdallahshaban557

@abdallahshaban557 We would like to pass fingerprint id to pre-signup lambda using federatedSignIn()

wookieJ avatar Apr 20 '23 16:04 wookieJ

@abdallahshaban557 I'm following this issue as well, not a blocker for me as we are still evaluating Cognito as a solution, but in prototypes I've built this has been an issue. For my use case, I would like the to pass application context that I can rely on in cognito triggers. It basically comes down to tenant information in our use case. We use the same logic for all tenants, but we need to know the tenant identity. For federated logins we would have to infer it from other information since the client has no way to pass it to us.

evc-erik avatar Apr 20 '23 16:04 evc-erik

This is really helpful context @evc-erik - thank you so much!

abdallahshaban557 avatar Apr 25 '23 03:04 abdallahshaban557

Hello. We also need this for our use case.

When users sign up with a Google/Apple/Facebook account with an email associated with an existing Cognito user, I am throwing an error from a pre-signup trigger to ask the client to specify whether to link those accounts or not.

In a subsequent call to federatedLogIn, I need to be able to pass a signal to my pre-signup trigger to specify what action the user chooses to take in those cases.

This issue is a blocker for this use case, and I'll probably have to figure out a hacky workaround to implement this. Not sure what I'll do yet.

This functionality would be very useful for us.

mtourj avatar Jun 23 '23 06:06 mtourj

Hello. Our team needs this as well. I created a new issue explaining our use case here.

turakvlad avatar Oct 07 '23 08:10 turakvlad

Just wanted to drop a comment on this issue to say that while there hasn't been any progress to report on this feature request yet, we've marked it to be reviewed with the Cognito team again. If there's any updates that can be provided, we'll share them as soon as we can!

cwomack avatar Nov 22 '23 18:11 cwomack

This is a must have in order to pass any extra information to the Post Authentication trigger. We really shouldn't have to justify why that is necessary.

disrael avatar Dec 03 '23 23:12 disrael

need this feature for our release

taransalh1 avatar Dec 05 '23 15:12 taransalh1

I would say this particular thread is the most active with regard to this issue. Any updates? Also, in the meantime I think a lot of developers could possibly benefit from updating docs indicating passing metadata when signing in with OAuth redirect is not supported.

hcac10 avatar May 02 '24 00:05 hcac10