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

Guide: Generating and Registering Google OAuth Refresh Token #408

Open
rlho opened this issue Sep 11, 2024 · 0 comments
Open

Guide: Generating and Registering Google OAuth Refresh Token #408

rlho opened this issue Sep 11, 2024 · 0 comments

Comments

@rlho
Copy link
Collaborator

rlho commented Sep 11, 2024

Guide: Generating and Registering Google OAuth Refresh Token

This document outlines the process of generating a Google OAuth Refresh token and registering it as a GitHub Environment Secret for the booking-app project.

Prerequisites

  • Appropriate permissions to modify GitHub Secrets
  • A Google account with the email [email protected]

Steps

1. Run the Script

  1. Navigate to the booking-app/scripts directory( https://github.com/ITPNYU/booking-app/tree/main/booking-app/scripts
    ) in the repository on terminal

  2. Run scripts for the required environment.

Screenshot 2024-09-10 at 9 45 52 PM

Upon execution, it will display a URL in the console.

2. Obtain the Refresh Token

  1. Ensure you are logged in to the Google account associated with [email protected].

  2. Copy the URL displayed by the script and paste it into your web browser.

1

  1. You will be redirected to a Google authorization page. Click "Continue" to proceed.
    2
    3

  2. After authorization, you will receive a Refresh token. Copy this token.
    4

    Note: If you encounter any errors during this process, it may indicate issues with the Client ID or Client Secret in the script. Review the script configuration to ensure these are set correctly.

3. Update GitHub Secrets

  1. Go to the GitHub repository settings for the booking-app project.
    5

  2. Navigate to the Secrets section.

  3. Look for the GOOGLE_REFRESH_TOKEN secret.
    6

  4. Update the secret with the new Refresh token you obtained.

    Important: There are separate GOOGLE_REFRESH_TOKEN secrets for each environment (dev, stg, prod). Ensure you update the correct one corresponding to the environment used in the script.

4. Redeploy Google Action

  1. Access the Google Actions console.

  2. Find the Action deployed to the target environment (dev, stg, or prod).
    7

  3. Trigger a "Rerun script" operation for the Action to apply the changes.
    8

Video

https://drive.google.com/file/d/1e8t9fNkA6YTAqqGzeZln538QZDO_a6Wg/view?usp=sharing

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