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

206
Visualizações
Google oauth2 only responding with two segment token

Im using google oauth2 using the endpoint https://accounts.google.com/o/oauth2/v2/auth with the parameters

{
client_id:<my client id>,
redirect_uri:"http://localhost:3000/token",
response_type:"token",
scope:"https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile",
hd:<my schools email domain>
}

I get redirected to the redirect uri however the jwt I get in the redirected uri only contains 2 instead of 3 segments. Any advice?

edit: I have already diagnosed that this is not an issue with my code, but likely the parameters I'm using. This is the url that users are redirected to (I've included an api key that I will later revoke)

https://accounts.google.com/o/oauth2/v2/auth?client_id=668057106978-05crcscup6ckn2ktnsk96jp3bq8hckk7.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Ftoken&response_type=token&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile

I am redirected to (I have censored everything except periods underscores and dashes - not sure if the dashes and underscores are important) http://localhost:3000/token#access_token=xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxx_xxxxxxxxxxx_x_-xx-xxxxxx-xxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxxxxxx&token_type=Bearer&expires_in=3599&scope=email%20profile%20https://www.googleapis.com/auth/userinfo.email%20https://www.googleapis.com/auth/userinfo.profile%20openid&authuser=0&prompt=consent

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