This project requires Google OAuth2 credentials to interact with the Google Drive API. Follow these steps to generate your GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.
- Go to the Google Cloud Console.
- Click the Project Dropdown at the top and select New Project.
- Name your project (e.g.,
Endless-Storage) and click Create.
- In the sidebar, navigate to APIs & Services > Library.
- Search for "Google Drive API".
- Click the result and click Enable.
- Go to APIs & Services > OAuth consent screen (or Google Auth Platform > Branding).
- Select User Type: External and click Create.
- Fill in the App Information (App name, User support email).
- Scroll to Developer contact information and add your email.
- Click Save and Continue.
While the app is in "Testing" mode, Google will block any user not explicitly added to the allowlist.
- Navigate to the Audience tab (or the Test Users section of the consent screen).
- Click + ADD USERS.
- Enter the Gmail address(es) you will use for testing.
- Click Save.
- Go to APIs & Services > Credentials.
- Click + Create Credentials and select OAuth client ID.
- Select Application type: Web application.
- Under Authorized redirect URIs, add:
http://localhost:3000/oauth/callback
- Click Create. A dialog will appear with your Client ID and Client Secret.
Add the following keys to the .env file in your project root (if it doesn't exist):
GOOGLE_CLIENT_ID="your_client_id_here"
GOOGLE_CLIENT_SECRET="your_client_secret_here"