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

146
Visualizações
Locally authenticating someone who's only used Oauth2.0

Is it possible to locally authenticate a user who has only logged onto my website using Oauth 2 (maybe using Google or Facebook)?


Say a user has only ever logged onto my app using Oauth 2 (ex. Google) and one day decides to log on locally (via email or username and password), he wouldn't be able to log in because you can't access a users password via Oauth. For example, by using Oauth 2, I may only have stored his Google_id and his display name in the database. He probably doesn't even know his Google_id in the first place.

Can he log in locally? I know the situation I just made would make it impossible, but is there a way to structure your database so that the user can log in either locally or with Oauth 2 and access the same account?


Also, wouldn't this be the case if he decides to log in using Oauth 2 via Facebook instead of Google?

If anyone could shed light on this for me I'd be very grateful! I only worry because if a user log on via Oauth 2, makes a lot of progress on my website then logs in locally or via a different social media platform (via Oauth 2), they would be confused and possibly falsely believe their data has been lost.

I'm using SQL and Node.js (Express), not that it matters.

over 4 years ago · Santiago Trujillo
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