Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print auth URL in case the code fails to open default browser #205

Open
nmlynch94 opened this issue Jan 22, 2025 · 0 comments
Open

Print auth URL in case the code fails to open default browser #205

nmlynch94 opened this issue Jan 22, 2025 · 0 comments

Comments

@nmlynch94
Copy link

nmlynch94 commented Jan 22, 2025

What would you like to see in the library?

When calling authenticate, it attempts to open a browser to authorize the google application to access your data. However, in my case for some reason it was failing to open my browser on Fedora 41. There were no errors in the logs and it just hangs, presumably waiting for the user to interact with the browser.

I would like to print the auth URL as a fallback that can be copied into the browser. In my case, I modified index.js to be:

            // open the browser to the authorize url to start the workflow
            const authorizeUrl = client.generateAuthUrl({
                redirect_uri: redirectUri.toString(),
                access_type: 'offline',
                scope: scopes.join(' '),
            });
            console.log("URL: " + authorizeUrl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant