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

Can't run grow preprocess because of Google auth problems #37

Open
jkevingutierrez opened this issue Nov 10, 2022 · 1 comment
Open

Comments

@jkevingutierrez
Copy link
Contributor

jkevingutierrez commented Nov 10, 2022

Lately we haven't been able to run grow preprocess because we are not able to authenticate in Google.

Not sure if something changed in Google's authentication method, but this is the error that we are getting:

201107066-9c8f0cfc-617d-4fd5-8146-3226a44a1881

Looks like it is something related to

https://developers.google.com/identity/protocols/oauth2/resources/loopback-migration#what-is-the-loopback-ip-address-flow

https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html#dates-loopback

@jeremydw
Copy link
Member

Hi Kevin,

When running either the staging or preprocess commands, please supply the --interactive-auth flag to indicate that Grow should receive the Oauth authorization code via a local web server:
https://developers.google.com/identity/protocols/oauth2/native-app#handlingresponse

Here's a sample command (note you can replace "stage" with "preprocess" below).

grow --auth=[[email protected]](mailto:[email protected]) --interactive-auth stage

Note that you'll only need to supply these flags once (when you first authenticate). After that, you can run:

grow stage

Additionally, if you want to reset the local storage of all credentials, you can use:

grow --clear-auth --interactive-auth stage

And that will allow you to start from scratch.

The key requirement here is to supply --interactive-auth which triggers the redirect-based flow (rather than the copy-paste-based flow). As an alternative, you can also authenticate with a service account key file using:

grow --auth-key-file=path/to/key/file.json stage

I'll look into removing the OOB/copy-paste flow from Grow to make this more obvious now that that flow has been deprecated by Google.

Hope that helps,
Jeremy

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

2 participants