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

125
Visualizações
What's the best practice to identify the user by query data from the frontend?

I'm developing an app with a React Native frontend and a serverless backend which is the API Gateway REST API to invoke lambdas.

I'm also using AWS Cognito and a post-confirmation lambda trigger to create the user in the db. The lambda retrieves the user name and email from the trigger, and saves those details in db.

Now I am working on an endpoint to update the user on a POST request from the frontend, and I was wondering what the best practice was on identifying the user that the backend should update from the details given by the frontend.

Since the field that is unique is the user_email, I was thinking of encrypting the user email from the frontend and passing it as query to the call to the rest api endpoint. Then the invoked lambda will decrypt the query and identify which user to update.

I also thought of passing the id of the user as query, but the id is of type serial PRIMARY KEY and is created in the db when the user registers and is verified through AWS Amplify (with AWS Cognito). So the frontend has no knowledge of what the id is for the user yet, and would have to make a call to the backend to get the created user, which is an extra API call.

Could you please advise a safe way to achieve this? Thank you so much!

about 4 years ago · Juan Pablo Isaza
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