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

Help with "Set up local environment variables." #37

Closed
anthonyjclarke opened this issue Jan 18, 2024 · 3 comments
Closed

Help with "Set up local environment variables." #37

anthonyjclarke opened this issue Jan 18, 2024 · 3 comments

Comments

@anthonyjclarke
Copy link

anthonyjclarke commented Jan 18, 2024

Apologies in advance, a complete "terminal" noobie here.... but nearly there... diligently followed all steps and now at this one.

  1. cp example.env .env - DONE and verified by using "vim .env" and I am editing a file

  2. Generate FLASK_SECRET_KEY with python -c 'import secrets; print(secrets.token_hex())' and add it to .env. - DONE - I had to run "python3 xxx" but generated a long Key that I copied and in the first line of .env I replaced "FLASK_SECRET_KEY=XYZ" with my secret Key overwriting "XYZ" what was there from the "I assume" example.env file

  3. Add GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from the client_id and client_secret values from the client secret file created above.

This is where I am stuck, where do I get GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET from the client secret file... is this the JSON File created in the step before "Go to APIs & Services > Credentials > Create Credentials > OAuth client ID" ? I would appreciate unpacking this step with some more detail.

Really appreciate any help. Thanks

@mtalcott
Copy link
Owner

Hi @anthonyjclarke,

You should be able to open the client secret file with a text editor and see something like this JSON structure:

{
  "web": {
    "client_id": "asdfjasdljfasdkjf",
    "client_secret": "1912308409123890",
    "redirect_uris": ["https://www.example.com/oauth2callback"],
    "auth_uri": "https://accounts.google.com/o/oauth2/auth",
    "token_uri": "https://accounts.google.com/o/oauth2/token"
  }
}

In this example, your GOOGLE_CLIENT_ID is asdfjasdljfasdkjf and your GOOGLE_CLIENT_SECRET is 1912308409123890.

Alternatively, these are also available for me in the Google Cloud Console under APIs & Services > Credentials once you click on an entry in the OAuth 2.0 Client IDs list.

@mtalcott
Copy link
Owner

I also want to acknowledge this setup is very involved, and prevents most people from using the tool! This setup is what I could scrap together with the limited time I am able to set aside for this project.

In the future I'd like to provide a hosted web app that avoids all this. Unfortunately, it requires a bigger time investment than I'm currently able to make.

@anthonyjclarke
Copy link
Author

Thanks. I've taken my time and done very slowly and cautiously. Nearly there.

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