Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

204
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!