GitHub Authentication
PlatformWorks Hub supports login via GitHub using OAuth2.
This allows users to authenticate using their GitHub accounts. Only users from allowed GitHub organizations or with specific usernames can be permitted (custom logic may apply).
Required Environment Variables
| Variable | Description |
|---|---|
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID | GitHub OAuth App Client ID |
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET | GitHub OAuth App Client Secret |
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_SCOPE | Typically: read:user,user:email |
SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_AUTHORIZATION_GRANT_TYPE | Usually: authorization_code |
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_AUTHORIZATION_URI | GitHub authorize endpoint |
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_TOKEN_URI | GitHub token endpoint |
SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_USER_INFO_URI | GitHub user info endpoint |
Setup Instructions (GitHub OAuth App)
- Go to GitHub Developer Settings
- Under OAuth Apps, click New OAuth App
- Fill in the following:
- Application name: e.g.
Hub App - Homepage URL:
https://your-domain.com
(replace with your actual deployment domain) - Authorization callback URL:
https://your-domain.com/login/oauth2/code/oidc
- Application name: e.g.
- After registration:
- Copy the Client ID and Client Secret
- Set the logout URL (optional) in your frontend config:
https://your-domain.com/logout