Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda