Overview
Openlane Console implements a robust, multi-layered authentication system using NextAuth.js with support for traditional credentials, OAuth providers, enterprise SSO, two-factor authentication, and modern WebAuthn passkeys.All authentication flows are implemented in the
(auth) route group and managed through NextAuth.js v5 (beta).Authentication Methods
The Console supports multiple authentication methods that can be used individually or in combination:Password-Based Login
Traditional email and password authentication with reCAPTCHA protection.- User Flow
- Security Features
Enter Email
User enters their email address. The system automatically checks for SSO requirements via WebFinger API.
OAuth Providers
Seamless authentication with GitHub and Google OAuth.Enterprise SSO (OIDC)
Enterprise-grade Single Sign-On using OpenID Connect.SSO Configuration Flow
SSO Configuration Flow
Configure Identity Provider
Organization admins navigate to Organization Settings → Authentication → SSO ConfigurationRequired fields:
- Identity Provider (e.g., Okta, Azure AD, Google Workspace)
- Client ID
- Client Secret
- OIDC Discovery Endpoint (e.g.,
https://your-idp.com/.well-known/openid-configuration)
Test SSO Connection
Before enforcing SSO, admins should verify the connection:Successful test redirects back with
?ssotested=1Enable SSO Enforcement
Once tested, toggle Enforce SSO to require all organization members to use SSO.
Organization owners can still use password login even when SSO is enforced, providing a safety mechanism.
WebAuthn Passkeys
Modern passwordless authentication using biometrics, security keys, or device authentication.- Registration
- Authentication
- Device Management
Users can register passkeys from User Settings → Passkeys and security keys:
The Console uses SimpleWebAuthn library for WebAuthn implementation:
@simplewebauthn/browser- Client-side WebAuthn operations@simplewebauthn/server- Server-side verification
Two-Factor Authentication (2FA)
TOTP-based two-factor authentication with recovery codes.User Enables 2FA
From user settings, users scan a QR code with an authenticator app (Google Authenticator, Authy, 1Password, etc.)
Login Redirect
After successful password authentication, users with 2FA enabled are redirected to
/tfaSession Management
Session Configuration
Customize session behavior via environment variables:Session Updates
The Console uses NextAuth’supdate() function to refresh session data:
Domain Restrictions
Restrict signups and logins to specific email domains:Security Best Practices
Use HTTPS in Production
Use HTTPS in Production
NextAuth requires HTTPS in production for secure cookie transmission. Set up SSL/TLS certificates for your domain.
Rotate Secrets Regularly
Rotate Secrets Regularly
Rotate OAuth client secrets, API tokens, and session secrets periodically:
- OAuth credentials: Every 90 days
- Session secrets: Every 6 months
- API tokens: Based on your security policy
Enable reCAPTCHA
Enable reCAPTCHA
Protect against bot attacks by enabling reCAPTCHA:Add the reCAPTCHA script to your site:
Monitor Failed Login Attempts
Monitor Failed Login Attempts
Implement rate limiting and monitoring for failed authentication attempts. The Console supports integration with logging services via
GCS_LOG_BUCKET.Enforce MFA for Admins
Enforce MFA for Admins
Require 2FA or passkeys for users with elevated permissions (organization owners, compliance admins).
Troubleshooting
SSO Callback Errors
SSO Callback Errors
Problem: Users see “SSO callback failed” after attempting SSO loginSolutions:
- Verify OIDC Discovery Endpoint is accessible
- Check Client ID and Client Secret are correct
- Ensure callback URL is whitelisted in IdP:
https://your-domain.com/api/auth/sso/callback - Verify organization ID cookie is set properly
- Test SSO connection using the “Verify SSO connection” button
Passkey Registration Fails
Passkey Registration Fails
Problem: Users cannot register passkeys (InvalidStateError)Solutions:
- User may have already registered a passkey on this device - check existing passkeys
- Clear browser data and try again
- Use a different device or authenticator
- Ensure
useAutoRegister: falsein settings flows
2FA Code Invalid
2FA Code Invalid
Problem: TOTP codes consistently fail validationSolutions:
- Check device time is synchronized (TOTP is time-based)
- Ensure user is entering the current code (codes expire every 30 seconds)
- Verify the correct secret was scanned during setup
- Use a recovery code as fallback
Next Steps
Dashboard
Learn about the dashboard and user workflows
Organizations
Set up multi-organization access
Deployment
Configure authentication in production
API Reference
Explore authentication APIs