Set up OAuth providers
One-click sign-in. Let users authenticate with social accounts instead of managing another set of credentials. Works for both portal users (customers) and team members (your employees).
Overview
OAuth lets users sign in with accounts they already have. No new passwords, no verification emails. Just a quick popup to authorize access and they're in.
Supported Providers
| Provider | Configuration | Notes |
|---|---|---|
| Apple | Client ID, Client Secret, App Bundle Identifier (optional) | Bundle ID only needed for native apps |
| Discord | Client ID, Client Secret | |
| Client ID, Client Secret | ||
| GitHub | Client ID, Client Secret | |
| GitLab | Client ID, Client Secret, Issuer URL (optional) | Issuer URL for self-hosted GitLab |
| Client ID, Client Secret | ||
| Client ID, Client Secret | ||
| Microsoft | Client ID, Client Secret, Tenant ID (optional) | Defaults to "common" for multi-tenant |
| Client ID, Client Secret | ||
| Twitter / X | Client ID, Client Secret |
All providers work for both portal users and team members. For enterprise identity providers (Okta, Auth0, Keycloak), see Custom OIDC.
How It Works
- User clicks "Continue with [Provider]"
- A popup window opens to the provider's login page
- User authenticates and grants permission
- Provider redirects back to Quackback with authorization code
- Quackback exchanges the code for user information
- User session is created
GitHub Setup
Step 1: Create OAuth Application
[GitHub]
- Go to GitHub Developer Settings
- Click OAuth Apps > New OAuth App
- Fill in the application details:
| Field | Value |
|---|---|
| Application name | Quackback (or your custom name) |
| Homepage URL | https://feedback.yourcompany.com |
| Authorization callback URL | https://feedback.yourcompany.com/api/auth/callback/github |
- Click Register application
- Note the Client ID
- Click Generate a new client secret and save it securely
Step 2: Configure Environment
Add to your .env file:
GITHUB_CLIENT_ID="your-client-id"
GITHUB_CLIENT_SECRET="your-client-secret"Callback URL Format
https://YOUR_DOMAIN/api/auth/callback/github
For local development:
http://localhost:3000/api/auth/callback/github
Scopes Requested
read:user- Read user profile informationuser:email- Access user email addresses
Google Setup
Step 1: Create OAuth Credentials
[Google Cloud Console]
- Go to Google Cloud Console
- Create a new project or select an existing one
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- If prompted, configure the OAuth consent screen first:
- User Type: External (or Internal for Workspace)
- App name:
Quackback - User support email: Your email
- Authorized domains:
yourcompany.com
Step 2: Configure OAuth Client
[Google Cloud Console]
- Application type: Web application
- Name:
Quackback - Authorized JavaScript origins:
https://feedback.yourcompany.com - Authorized redirect URIs:
https://feedback.yourcompany.com/api/auth/callback/google - Click Create
- Note the Client ID and Client Secret
Step 3: Configure Environment
GOOGLE_CLIENT_ID="your-client-id.apps.googleusercontent.com"
GOOGLE_CLIENT_SECRET="your-client-secret"Callback URL Format
https://YOUR_DOMAIN/api/auth/callback/google
Scopes Requested
openid- OpenID Connect authenticationemail- User email addressprofile- Basic profile information
Enable OAuth in Quackback
OAuth providers are configured in the admin dashboard, not through environment variables. Credentials are stored encrypted in the database.
Admin Settings
[Dashboard]
- Navigate to Admin → Settings → Portal Authentication (or Security for team auth)
- Click on the provider you want to configure
- Enter the Client ID, Client Secret, and any provider-specific fields
- Toggle the provider on
Providers only appear on the sign-in page when they're configured and enabled.
Other Providers
All providers follow the same pattern:
- Create an OAuth application in the provider's developer console
- Set the callback URL to
https://YOUR_DOMAIN/api/auth/callback/PROVIDER_ID - Enter the Client ID and Client Secret in Quackback's admin settings
| Provider | Developer Console | Callback URL |
|---|---|---|
| Apple | Apple Developer | /api/auth/callback/apple |
| Discord | Discord Developer Portal | /api/auth/callback/discord |
| Meta for Developers | /api/auth/callback/facebook | |
| GitLab | GitLab Applications | /api/auth/callback/gitlab |
| LinkedIn Developers | /api/auth/callback/linkedin | |
| Microsoft | Azure App Registrations | /api/auth/callback/microsoft |
| Reddit Apps | /api/auth/callback/reddit | |
| Twitter / X | X Developer Portal | /api/auth/callback/twitter |
Common Issues
"OAuth callback URL mismatch"
The callback URL in your OAuth app configuration must match exactly:
Check these common issues:
- Protocol mismatch (
httpvshttps) - Trailing slash differences
- Port number missing or incorrect
- Domain/subdomain mismatch
Example correct callback URLs:
# Production
https://feedback.yourcompany.com/api/auth/callback/github
# Local development
http://localhost:3000/api/auth/callback/github
"Invalid client_id or client_secret"
- Verify the credentials are copied correctly (no extra spaces)
- Ensure the OAuth app is not deleted or disabled
- For Google, check if the OAuth consent screen is in testing mode
"Popup blocked"
Quackback uses popup windows for OAuth. If blocked:
- Click the browser's popup blocked notification
- Allow popups for your Quackback domain
- Try the sign-in again
"Access denied" or "Application not authorized"
GitHub:
- Verify the OAuth app is not suspended
- Check organization access policies
Google:
- If consent screen is in testing mode, add test users
- Submit app for verification for production use
- Check if domain restrictions apply
"Unable to get email from provider"
Some providers don't return email by default:
GitHub:
- User must have a public email or grant email permission
- Quackback fetches from
/user/emailsas fallback
Google:
- Email scope is always requested
- User must have a Google account with email
CORS Errors
If you see CORS errors in the browser console:
- Verify
BASE_URLmatches your actual domain - Check
BASE_URLis correctly set - Ensure your reverse proxy passes the correct headers
Security Best Practices
Protect Client Secrets
- Never commit secrets to version control
- Use environment variables or secret management
- Rotate secrets periodically
- Use separate OAuth apps for development/production
Verify Callback URLs
- Use HTTPS in production
- Don't use wildcard callback URLs
- Restrict to your exact domain
Review OAuth Permissions
Each provider requests minimal scopes:
- Basic profile information
- Email address (for account identification)
No write access or sensitive permissions are requested.
Monitor OAuth Activity
- Review sign-in logs regularly
- Set up alerts for unusual patterns
- Disable unused OAuth providers
Test OAuth locally
[Browser]
Local Development Setup
- Use
localhost:3000in your callback URL - Most providers allow
http://localhostfor development - For Google, add
http://localhost:3000to authorized origins
Test checklist
- OAuth app created with correct callback URL
- Credentials entered in admin settings
- Browser allows popups from your domain
- Test user exists (for testing-mode apps)
Next steps
- Custom OIDC - Enterprise identity providers (Okta, Auth0, Keycloak)
- Email OTP - Magic code authentication
- Authentication Overview - All auth options