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

135
Vistas
Is it bad practice to use a uuid passed into the session cookie for the purpose of authorisation to make other queries to the database

I use a uuid v4 to generate custom userId that is then stored in the session cookie for facilitate authorisation and authentication. I also store this userId in the database to uniquely identify users. On some of my api's i have the server return that userId as a means to identify users. For example, if i built a reddit clone and i have an end point that returns all the posts from a particular subreddit with each post having the userId of the author. Is this bad practice? I don't want to use the auto generated primary key for each table to uniquely identify users, because since its sequential, it can be guessed.

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