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

clasp login --no-localhost No Longer Working #948

Open
starkprime opened this issue Nov 5, 2022 · 7 comments
Open

clasp login --no-localhost No Longer Working #948

starkprime opened this issue Nov 5, 2022 · 7 comments
Milestone

Comments

@starkprime
Copy link

Access blocked: clasp – The Apps Script CLI’s request is invalid
This might be due to this:
https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#instructions-oob

Steps to Reproduce the Problem

  1. clasp login --no-localhost
@lfourreau
Copy link

is there a workaround because we have the same problem ?

@starkprime
Copy link
Author

The workaround I use is locally doing a normal clasp login on your local terminal (not ssh'd in) having the browser pop up for the auth. And then rsync the the .clasprc.json to the remote host.
It's pretty silly, but this works ¯_(ツ)_/¯

@oshag-mcesc
Copy link

Thanks for the work around starkprime however, my issue is I am trying to use Codespaces or gitpod so I can develop more robust Google Apps Script solutions from any Chrome browser. I am not sure how I could "rsync" the JSON file to the remote host. If you have some guidance on how to do that while using Codespace or gitod I would appreciate it (as would many others I would imagine!! )

@leetutoring
Copy link

I am having the same issue on my end due to the move away from OOB.

@oshag-mcesc
Copy link

oshag-mcesc commented Mar 29, 2024

UPDATE: I just tried this and it is not working.... not sure what do do now... if someone gets it to work please pass it along as to how you did!

I had the same issue awhile ago. So far the following is working for me on Codesandbox and Gitpod

  1. $ clasp login
  2. Opened the URL that is given in the terminal
  3. Logged in as usual
  4. Copied the [error URL] from the browser
  5. Back in Gitpod open a new terminal
  6. $ curl [error URL] <--- paste erro URL from step 4 (obviously with out the brackets)
    And this should successfully log you in.

Here is the reference:
#953 (comment)
(should work for gitpod as well)
#953 (comment)

Hope this helps!!

@leetutoring
Copy link

Thank you! That worked for me.

@sqrrrl sqrrrl added this to the 3.0 milestone Jan 17, 2025
@sqrrrl sqrrrl closed this as completed Jan 17, 2025
@sqrrrl sqrrrl reopened this Jan 17, 2025
@sqrrrl
Copy link
Member

sqrrrl commented Jan 17, 2025

Will be fixed in 3.0

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

5 participants