Skip to content

Google Cloud Configuration

Complete guide to set up OAuth 2.0 credentials and enable required APIs.

Create a Google Cloud Project

  1. Go to Google Cloud Console
  2. Click Select a ProjectNew Project
  3. Name: Skigk Søkeapp
  4. Click Create

Enable Required APIs

  1. In the left menu, go to APIs & ServicesEnabled APIs & Services
  2. Click + Enable APIs and Services
  3. Search for and enable:
  4. Google Drive API (for file search)
  5. Google Gemini API (for AI summaries)

Create OAuth 2.0 Credentials

  1. Go to APIs & ServicesCredentials
  2. Click + Create CredentialsOAuth client ID
  3. If prompted, configure the OAuth consent screen first:
  4. User Type: External
  5. App name: Skigk Søkeapp
  6. User support email: admin-2025@skigk.no
  7. Scopes: Add drive.readonly and openid
  8. Test users: Add your Google Workspace email

  9. Back to Credentials:

  10. Application type: Web application
  11. Name: Skigk Web Client
  12. Authorized JavaScript origins:
    • http://localhost:4200 (development)
    • https://skigk-soekeapp.web.app (production)
  13. Authorized redirect URIs:
    • http://localhost:4200/callback
    • https://skigk-soekeapp.web.app/callback
  14. Click Create

  15. Copy the Client ID and save it in .env.local:

    VITE_GOOGLE_CLIENT_ID=YOUR_CLIENT_ID.apps.googleusercontent.com
    

Create Gemini API Key

  1. Go to APIs & ServicesCredentials
  2. Click + Create CredentialsAPI Key
  3. Copy the key and add to .env.local:
    VITE_GEMINI_API_KEY=YOUR_API_KEY
    

Enable for Google Workspace

  1. Go to APIs & ServicesCredentials
  2. Click on your OAuth 2.0 application
  3. Under Scopes, add:
  4. https://www.googleapis.com/auth/drive.readonly
  5. https://www.googleapis.com/auth/userinfo.profile
  6. https://www.googleapis.com/auth/spreadsheets.readonly

  7. 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