Skip to content

--no-localhost option in authentication mode breaks if Jupyter Notebook is installed #1103

@Mansari

Description

@Mansari

If you launch clasp login --no-localhost and try to finish the steps, instead of getting the redirect to localhost that will give you an error (yet the URL has the code to exchange for access and refresh tokens), Juypter Notebook is actually running a web server on the same port clasp redirects to and interrupts the redirect and the URL is no longer the same (probably does not contain the code anymore).

Note that using the serverless authentication option does not make use of the --redirect-port option as the URL is hard coded as https://localhost:8888 in serverless_auth_code_flow.ts

Suggest to use a non-standard redirect port in the --no-localhost mode to avoid any conflicts with this application or others, or (better option) respect the redirect-port option to make it more flexible when combined with the server less auth option.

PS: I did not submit a PR yet as I was not sure if the OAuth client allowlisted redirect URLs have to be updated as well with whatever port we choose (e.g. 12345). Jules created a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions