Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

123
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda