Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

539
Visualizações
AWS Coginto API , Forgot Password Action not raising InvalidParameterException even if neither a verified phone number nor a verified email exists

As per docs says https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ForgotPassword.html If the user has not yet verified his email or phone number then

Auth.forgotPassword(username)

should return some error message. as written in documentation

If neither a verified phone number nor a verified email exists, an InvalidParameterException is thrown.

but it's not raising an exception, instead, I receive a success response.

"CodeDeliveryDetails":{"AttributeName":"email","DeliveryMedium":"EMAIL","Destination":"m***@g***.com"}}

I dont receive the email though.

what can be the reason ?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I was seeing the same problem. It turned out related to this:

Use the PreventUserExistenceErrors setting of a user pool application client to enable or disable errors related to user existence.

Mentioned here: https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-managing-errors.html :

After changing that setting in the user group to 'Legacy' from 'Enabled', I started seeing a 400 response:

 { "__type": "UserNotFoundException", "message": "Username/client id combination not found." }
over 4 years ago · Santiago Trujillo Relatório

0

@ryan-hines oh my god thank you! I have been struggling with this for days.

We had a very similar problem:

  • The user registers through Google
  • User tries to reset password
  • We wanted to disallow this and tell them to use their social login (you'd think Cognito would take care of this part, but no)
    • To solve this, we write a custom migration lambda to handle "UserMigration_ForgotPassword"
    • Even though we threw an error in the lambda, it still showed a success message in the UI, but didn't send the email.

In the new Cognito UI, we had to enter:

  • Application Integration
  • Click on the application client
  • Click "Edit" in the customer information section of the app
  • At the bottom, under "Advanced security settings", uncheck "Prevent user existence errors"

The UI now correctly displays a failure when our lambda throws an error.

checkbox to prevent user existence errors

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda