Skip to content

Commit 21e93ab

Browse files
committed
docs: GCS info for generating credentials
1 parent 41db38f commit 21e93ab

File tree

2 files changed

+42
-2
lines changed

2 files changed

+42
-2
lines changed

.env.example

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
DATABASE_URL="postgresql://mailbuddy:mailbuddy@localhost:5432/mailbuddy"
33

44
# Google OAuth
5-
GOOGLE_CLIENT_ID="your-google-client-id"
6-
GOOGLE_CLIENT_SECRET="your-google-client-secret"
5+
GOOGLE_CLIENT_ID=your-client-id.apps.googleusercontent.com
6+
GOOGLE_CLIENT_SECRET=your-client-secret
77

88
# Encryption
99
ENCRYPTION_KEY="your-encryption-key"

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,46 @@ REDIS_URL="redis://localhost:6379"
125125
# Other variables as specified in .env.example
126126
```
127127

128+
## 🔐 Gmail API Setup
129+
130+
### Required Scopes
131+
The following Gmail API scopes are required for full functionality:
132+
133+
```plaintext
134+
https://www.googleapis.com/auth/gmail.readonly
135+
https://www.googleapis.com/auth/gmail.modify
136+
```
137+
138+
### Setting up Google Credentials
139+
140+
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
141+
2. Create or select a project
142+
3. Go to OAuth Consent Screen:
143+
- Set user type to "External"
144+
- Fill in basic app info (for testing)
145+
4. Go to APIs & Services → Credentials
146+
5. Create OAuth 2.0 Client ID:
147+
- App type: Web
148+
- Add authorized redirect URIs:
149+
```
150+
http://localhost:3000/api/auth/callback/google
151+
```
152+
6. Download the credentials JSON file
153+
7. Add the following to your `.env.local`:
154+
```env
155+
GOOGLE_CLIENT_ID=your_client_id
156+
GOOGLE_CLIENT_SECRET=your_client_secret
157+
```
158+
159+
### Environment Variables
160+
Add these to your `.env.local`:
161+
162+
```env
163+
# Gmail API
164+
GOOGLE_CLIENT_ID=your_client_id
165+
GOOGLE_CLIENT_SECRET=your_client_secret
166+
```
167+
128168
## 🛠️ Tech Stack
129169

130170
<div align="center">

0 commit comments

Comments
 (0)