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

97
Visualizações
Session management with the new Google identity services web api

I've just begun work on a new web application and I wanted to implement account creation/logins using google's OAuth flow. I noticed that they're discontinuing the API most people are using. https://developers.google.com/identity/sign-in/web/sign-in. I'm trying to understand how the flow for then new API (https://developers.google.com/identity/gsi/web) works.

From what I've tried, that API just responds with a single access token, which is fine for the 15 minutes it's valid for, but I don't want my users to have to go through the login process every time they revisit the site. There doesn't seem to be a method in the API for refreshing the access token without the user having to be involved.

I feel like I'm missing a step because this doesn't feel like a replacement for the existing API at all.

Basically I'm asking if this new API has any session management capabilities. If it doesn't should I just use the deprecated API for now?

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

To get an overview of what is taking place during sign-in, imho it would be worth the five minutes or less it takes to read How it works to build a high level understanding of what's going on.

In answer to your specific questions:

Access tokens are no longer used, and neither are refresh tokens. A JWT ID token is shared instead. JWTs do not expire, but are signed and you'll want to validate them. The token response section of the migration guide has more detail on the switch to JWT's.

For session state you'll want to be aware that there are two session states 1) between the user and their Google account 2) the user and your app. The two are independent. The previous library included some helper functions to help you look at 1, but one side-effect was it made the distinction between 1 & 2 hazy and unclear. Session state and Listeners has more.

about 4 years ago · Juan Pablo Isaza Relatório
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