googleapis / nodejs-local-auth

A standalone library for receiving Google OAuth tokens
Apache License 2.0
35 stars 15 forks source link

After authentication redirect to my server not working #154

Closed iammohssin closed 1 year ago

iammohssin commented 1 year ago

Issue:

I am using this library to integrate google calendar. While redirect after authentication it gives message Authentication successful! Please return to the console..

Here is the exact line. https://github.com/googleapis/nodejs-local-auth/blob/2b69aec8785526b4f615c3294db07f320bdfcc20/src/index.ts#L105

So what's happening is, it is spninng it's own node.js server to handle the redirect. instead of redirecting to my speficied redirect url.

What i am trying to achieve

I want to redirect to my application server after authentication. Please help ?

sofisl commented 1 year ago

That library is built upon the google-auth library, I'd use this sample instead, making sure to include your redirect URI when you create the keys (full instructions here).