Google Cloud Configuration¶
Complete guide to set up OAuth 2.0 credentials and enable required APIs.
Create a Google Cloud Project¶
- Go to Google Cloud Console
- Click Select a Project → New Project
- Name:
Skigk Søkeapp - Click Create
Enable Required APIs¶
- In the left menu, go to APIs & Services → Enabled APIs & Services
- Click + Enable APIs and Services
- Search for and enable:
- Google Drive API (for file search)
- Google Gemini API (for AI summaries)
Create OAuth 2.0 Credentials¶
- Go to APIs & Services → Credentials
- Click + Create Credentials → OAuth client ID
- If prompted, configure the OAuth consent screen first:
- User Type: External
- App name:
Skigk Søkeapp - User support email:
admin-2025@skigk.no - Scopes: Add
drive.readonlyandopenid -
Test users: Add your Google Workspace email
-
Back to Credentials:
- Application type: Web application
- Name:
Skigk Web Client - Authorized JavaScript origins:
http://localhost:4200(development)https://skigk-soekeapp.web.app(production)
- Authorized redirect URIs:
http://localhost:4200/callbackhttps://skigk-soekeapp.web.app/callback
-
Click Create
-
Copy the Client ID and save it in
.env.local:VITE_GOOGLE_CLIENT_ID=YOUR_CLIENT_ID.apps.googleusercontent.com
Create Gemini API Key¶
- Go to APIs & Services → Credentials
- Click + Create Credentials → API Key
- Copy the key and add to
.env.local:VITE_GEMINI_API_KEY=YOUR_API_KEY
Enable for Google Workspace¶
- Go to APIs & Services → Credentials
- Click on your OAuth 2.0 application
- Under Scopes, add:
https://www.googleapis.com/auth/drive.readonlyhttps://www.googleapis.com/auth/userinfo.profile-
https://www.googleapis.com/auth/spreadsheets.readonly -
Set the application as "Internal" if you want only your organization to access it
Verify Setup¶
Test your credentials by running:
npm run dev
Visit http://localhost:4200 and verify OAuth login works.
Next Steps¶
- Setup Shared Drives for file discovery
- Deploy to Firebase