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

137
Visualizações
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 à 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