Date: 2025-02-08
Status: 🔴 ACTION REQUIRED
To access Google Drive and Chat/Gmail history, you need to:
- ✅ Frontend: Updated (but scopes are configured in Google Cloud Console)
- 🔴 Google Cloud Console: MUST UPDATE OAuth consent screen
- 🔴 APIs: MUST ENABLE Drive, Gmail, Chat APIs
- ⏳ Backend: Ready (clients created)
- Visit: https://console.cloud.google.com/
- Select your project
- Navigate: APIs & Services → OAuth consent screen
- Click Edit App (or create if new)
Click Add or Remove Scopes and add:
- ✅
openid - ✅
email - ✅
profile
-
🔴
https://www.googleapis.com/auth/drive.readonly- Display name: "See and download all your Google Drive files"
- User-facing: ✅ Yes
-
🔴
https://www.googleapis.com/auth/drive.file- Display name: "See, edit, create, and delete only the specific Google Drive files you use with this app"
- User-facing: ✅ Yes
- 🔴
https://www.googleapis.com/auth/gmail.readonly- Display name: "View your email messages and settings"
- User-facing: ✅ Yes
⚠️ Sensitive scope - requires verification for production
- 🔴
https://www.googleapis.com/auth/chat.messages.readonly- Display name: "View your Google Chat messages"
- User-facing: ✅ Yes
⚠️ Sensitive scope - requires verification for production
Click Save and Continue through all steps.
- Go to: APIs & Services → Library
- Search and enable:
- Search: "Google Drive API"
- Click Enable
- Search: "Gmail API"
- Click Enable
- Search: "Google Chat API"
- Click Enable
- Go to: OAuth consent screen → Test users
- Click Add Users
- Add email addresses:
- Your email
- Team member emails
- Test accounts
Note: Test users can grant sensitive scopes without Google verification.
The LoginModal.tsx has been updated, but @react-oauth/google requests scopes configured in Google Cloud Console, not via component props.
- User clicks "Sign in with Google"
- Google shows consent screens for all scopes configured in OAuth consent screen
- User grants permissions
- Token includes granted scopes
For better UX, you can request additional scopes later:
// Request Drive access when user needs it
import { useGoogleLogin } from '@react-oauth/google'
const requestDriveAccess = useGoogleLogin({
onSuccess: (tokenResponse) => {
// Use tokenResponse.access_token for Drive API
},
scope: 'https://www.googleapis.com/auth/drive.readonly'
})When user logs in, you'll receive:
- ID Token (JWT) - for authentication
- Access Token - for API calls (if scopes granted)
The backend should:
- Receive access token from frontend
- Store access token securely
- Use access token for Google API calls
Note: Current implementation only handles ID token. We need to update to also handle access token.
After updating Google Cloud Console:
- OAuth consent screen shows all scopes
- Drive API is enabled
- Gmail API is enabled
- Chat API is enabled
- Test users added (if in testing mode)
- Login flow shows consent screens for new scopes
- Access token includes requested scopes
- Backend can access Drive files
- Backend can access Gmail messages
For Testing:
- ✅ Works with test users
- ✅ No verification needed
- ✅ App must be in "Testing" mode
For Production:
⚠️ Requires Google verification (4-6 weeks)⚠️ Privacy policy URL required⚠️ Terms of service URL required⚠️ Security assessment may be required
- Start with Testing mode + test users
- Test all functionality with sensitive scopes
- Prepare verification materials for production
- Submit for verification when ready for production
✅ Frontend: Component updated (scopes come from Google Cloud Console)
✅ Backend: Google API clients created
✅ Gemini Client: Created and ready
✅ Agent 0.0: Updated to use Gemini
🔴 Google Cloud Console: NEEDS UPDATE (OAuth consent screen + APIs)
⏳ Access Token Handling: Needs update to store/use access tokens
-
Update Google Cloud Console (10 minutes)
- Add scopes to OAuth consent screen
- Enable APIs
- Add test users
-
Add Gemini API Key to
.env- Get from: https://aistudio.google.com/app/apikey
- Add:
GEMINI_API_KEY=your_key_here
-
Test Login Flow
- Clear cache
- Login
- Verify scopes are requested
-
Update Backend Auth (if needed)
- Handle access tokens
- Store tokens securely
- Use tokens for API calls
Priority: 🔴 HIGH - Update Google Cloud Console NOW