uncleU
Convex Community10mo ago
2 replies
uncle

Getting Authorization Code from redirect URI (using Convex Auth w/ Google Provider)

Hello! I am using Convex Auth and have followed the steps to configure the signIn, signOut and other library functions. Now, for my use case, I want to access the Google Calendar API, to which I need the Authorization Code, which I will ultimately use to get an access token. However, I'm having trouble 'intercepting' the redirect so I can extract the authorization code from it.

As you see in the image attached, after the user gives consent, it redirects from the Google consent screen to the Convex redirect URI with a code as one of the parameters and then back to our frontend which is at localhost:5173 along with a different 8 digit code that Google doesn't support. How can I go about getting the code in the parameter of the redirect URI?

Thank you!
Image_3-26-25_at_5.png
Was this page helpful?