2.7 KiB
2.7 KiB
OIDC Authentication Configuration Guide
This guide describes how to configure GitHub and Google OIDC authentication for the Cloud Neutral Toolkit.
Prerequisites
- Access to GitHub Developer Settings.
- Access to Google Cloud Console.
- Properly configured
accounts.svc.plusandconsole.svc.plusservices.
1. GitHub Configuration
1.1 Create GitHub OAuth App
- Log in to GitHub and go to Settings > Developer Settings > OAuth Apps.
- Click New OAuth App.
- Application name: e.g.,
Cloud Neutral Console - Homepage URL:
https://console.svc.plus(or your actual console domain) - Authorization callback URL:
https://accounts.svc.plus/api/auth/oauth/callback/github - Click Register application.
- Copy the Client ID.
- Click Generate a new client secret and copy the Client Secret.
1.2 Configure Environment Variables
Set the following environment variables for accounts.svc.plus:
GITHUB_CLIENT_ID=your_github_client_id
GITHUB_CLIENT_SECRET=your_github_client_secret
# Optional: if you want to override the default callback
# GITHUB_REDIRECT_URL=https://accounts.svc.plus/api/auth/oauth/callback/github
2. Google Configuration
2.1 Create Google OAuth Client ID
- Log in to Google Cloud Console.
- Select or create a project.
- Go to APIs & Services > Credentials.
- Click Create Credentials > OAuth client ID.
- Application type:
Web application. - Name: e.g.,
Cloud Neutral Console. - Authorized JavaScript origins:
https://console.svc.plus
- Authorized redirect URIs:
https://accounts.svc.plus/api/auth/oauth/callback/google
- Click Create.
- Copy the Client ID and Client Secret.
2.2 Configure Environment Variables
Set the following environment variables for accounts.svc.plus:
GOOGLE_CLIENT_ID=your_google_client_id
GOOGLE_CLIENT_SECRET=your_google_client_secret
# Optional: if you want to override the default callback
# GOOGLE_REDIRECT_URL=https://accounts.svc.plus/api/auth/oauth/callback/google
3. General OIDC Environment Variables
Ensure these are also set for accounts.svc.plus:
OAUTH_REDIRECT_URL=https://accounts.svc.plus/api/auth/oauth/callback
OAUTH_FRONTEND_URL=https://console.svc.plus
Note: The backend automatically appends /{provider} to OAUTH_REDIRECT_URL if a provider-specific redirect URL is not provided.
4. Frontend Configuration
For console.svc.plus, ensure the following is set so it knows where to redirect for the initial OAuth step:
NEXT_PUBLIC_ACCOUNTS_SVC_URL=https://accounts.svc.plus