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

333
Visualizações
Nextjs and user access token authentication

I am creating an rest-api with nextjs that will be with interacting with mobile application and web application. and my question is it a bad practice to the following as authentication without checking sessions. mysql scheme.

Table users.

ID USERID EMAIL NAME CREATEDAT

TABLE ACCESS TOKEN

ID USERID ACCESSTOKEN EXPIRATIONDATE IP LASTSIGNIN

User Create an account with https post request and creates a row at users table Also create a row with ip and access token with expiration date of the token.

Access token is save at the as cookie in users webbrowser

and with every visit on pages that require log in or a post request that token is matched with access token and ip is match with ip in access token tab

in case of difference in ip or token expired the users will be signed out immediately.

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