Overview
Reactive Resume supports custom OAuth providers, allowing you to integrate with enterprise identity providers and self-hosted authentication solutions. This is particularly useful for organizations that want to:- Use a centralized identity provider (Authentik, Authelia, Keycloak, etc.)
- Enforce Single Sign-On (SSO) across all internal applications
- Integrate with existing LDAP/Active Directory infrastructure
Custom OAuth is designed for self-hosted instances. If you’re using the hosted version at rxresu.me, you can use the built-in Google and GitHub sign-in options.
Environment Variables
To enable a custom OAuth provider, you need to configure the following environment variables in your.env file:
Required Variables
| Variable | Description |
|---|---|
OAUTH_CLIENT_ID | The client ID provided by your OAuth provider |
OAUTH_CLIENT_SECRET | The client secret provided by your OAuth provider |
Endpoint Configuration
You must configure endpoints using one of these two methods:- Option A: OIDC Discovery (Recommended)
- Option B: Manual URLs
For OIDC-compliant providers (most modern identity providers), you only need to set the discovery URL:
The discovery URL automatically provides the authorization, token, and userinfo endpoints.Examples:
| Variable | Description |
|---|---|
OAUTH_DISCOVERY_URL | Your provider’s .well-known/openid-configuration URL |
- Authentik:
https://auth.example.com/application/o/reactive-resume/.well-known/openid-configuration - Keycloak:
https://keycloak.example.com/realms/myrealm/.well-known/openid-configuration - Authelia:
https://auth.example.com/.well-known/openid-configuration
Optional Variables
| Variable | Description | Default |
|---|---|---|
OAUTH_PROVIDER_NAME | Display name shown on the sign-in button | Custom OAuth |
OAUTH_SCOPES | Space-separated list of OAuth scopes | openid profile email |
Callback URL
When configuring your OAuth provider, you’ll need to set the callback URL (also called redirect URI). Use the following format:APP_URL is https://resume.example.com, the callback URL would be:
Profile Mapping
Reactive Resume automatically maps user profile data from the OAuth provider. The following fields are used:| Reactive Resume Field | OAuth Profile Fields (in order of preference) |
|---|---|
| Email (required) | email |
| Name | name → preferred_username → email prefix |
| Username | preferred_username → email prefix |
| Avatar | image → picture → avatar_url |
The OAuth provider must return an email address. If no email is provided, authentication will fail with an error.
Provider-Specific Setup
Authentik
1
Create an OAuth2/OpenID Provider
In the Authentik admin interface, navigate to Applications → Providers and create a new OAuth2/OpenID Provider.
- Name: Reactive Resume
- Authorization flow: Use your preferred authorization flow
- Client type: Confidential
- Redirect URIs:
https://resume.example.com/api/auth/oauth2/callback/custom
2
Create an Application
Navigate to Applications → Applications and create a new application:
- Name: Reactive Resume
- Slug:
reactive-resume - Provider: Select the provider you just created
3
Copy credentials
From the provider settings, copy the Client ID and Client Secret.
4
Configure environment variables
.env
Authelia
1
Configure an OIDC client
Add a client configuration to your Authelia
configuration.yml:Generate the hashed secret using:
authelia crypto hash generate pbkdf2 --variant sha5122
Configure environment variables
.env
Keycloak
1
Create a client
In the Keycloak admin console:
- Select your realm
- Navigate to Clients → Create client
- Set Client ID (e.g.,
reactive-resume) - Set Client authentication to On
- Enable Standard flow
2
Configure redirect URI
In the client settings, add the redirect URI:
- Valid redirect URIs:
https://resume.example.com/api/auth/oauth2/callback/custom
3
Copy credentials
Go to the Credentials tab and copy the Client secret.
4
Configure environment variables
.env
Generic OIDC Provider
For any other OIDC-compliant provider:.env
Non-OIDC Provider (Manual Configuration)
For providers that don’t support OIDC discovery:.env
Complete Example
Here’s a complete.env snippet showing custom OAuth alongside other authentication options:
.env
Troubleshooting
'OAuth Provider did not return an email address' error
'OAuth Provider did not return an email address' error
Your OAuth provider must return an email address for user creation. Ensure:
- The
emailscope is included in your scopes - Your provider is configured to release the email claim
- The user has an email address set in the identity provider
Redirect URI mismatch error
Redirect URI mismatch error
The callback URL configured in your OAuth provider must exactly match:Common issues:
- Trailing slash mismatch
- HTTP vs HTTPS mismatch
- Port number differences
- Path case sensitivity
Custom OAuth button not appearing
Custom OAuth button not appearing
CORS or network errors during authentication
CORS or network errors during authentication
If running behind a reverse proxy:
- Ensure
APP_URLmatches your public URL - Verify the proxy passes the correct headers (
X-Forwarded-Proto,X-Forwarded-Host) - Check that your OAuth provider allows the redirect URI from your domain
User profile data is missing or incorrect
User profile data is missing or incorrect
The profile mapping depends on your provider returning standard claims:
email(required)nameorpreferred_usernamefor display namepicture,image, oravatar_urlfor avatar
Security Considerations
Use HTTPS
Always use HTTPS for both your Reactive Resume instance and OAuth provider in production. OAuth tokens should never be transmitted over unencrypted connections.
Protect secrets
Never commit
OAUTH_CLIENT_SECRET to version control. Use environment variables or a secrets manager.Verify redirect URIs
Configure your OAuth provider to only allow the exact redirect URI. Avoid wildcards in redirect URI configurations.
Review scopes
Only request the scopes you need. The default (
openid profile email) is sufficient for Reactive Resume.