1

We use fastapi-users to integrate Google auth. By default there are defined to endpoints /auth/google/authorize and /auth/google/callback.

So frontend which is in Angular calls /auth/google/authorize and as result we got URL in body. Than if we call this URL we got CORS error. After that we are not sure if this is right approach or on which order should we call API.

Also API /auth/google/callback has code, code_verifier, state and error fields where we get this fields?

enter image description here

We use fastapi-users package in our backend. We have major problems with integrating Google OAuth. URL: google auth By default there are two endpoints /auth/google/authorize and /auth/google/callback.

What is actually a flow for these endpoints? When we call the /auth/google/authorize endpoint, the response is:

enter image description here

We tried then calling this URL again in the frontend, because if we copy paste this URL in google, the response is token and token type. If we call this endpoint in our frontend, we get CORS error.

Is this even right approach? What frontend should do with these two endpoints? And what to do with the /auth/google/callback endpoint?

Thanks to everyone for help

Jason Aller
  • 3,541
  • 28
  • 38
  • 38

0 Answers0