ClientMetadata not present in custom challenge triggers

2

I'm trying to implement an custom challenge using Amplify -> Cognito, the issue is that when I call: Auth.signIn({... , validationData: {foo: 'bar'}, {foo: 'bar'}}), the validationData or clientMetadata are present in Define Auth Challenge or Create Auth Challenge triggers as described in the documentation https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-define-auth-challenge.html

It's extremely important to be able to send context to Define and Create Auth Challenge from the client so we could define what challenge was chosen on the client-side, e.g Email, or Sms, or even sending the users language so during sending the challenge the language could be defined to send messages through SNS, and it seems people are managing that in a hacky way by answering a "dummy" challenge just be able to send context to the lambda, here's the discussion in Amplify repo. I'd like to know if someone else went through this issue and figured out another solution and if Cognito team has plan to fix it?

Thanks.

gefragt vor 2 Jahren121 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen