Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

121
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!