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?
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:
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