Authentication
SPEAR supports multiple authentication methods to integrate with your organization’s identity infrastructure. Configure password-based authentication, OAuth2/OpenID Connect providers, or a combination of both.
Authentication Methods
Section titled “Authentication Methods”| Method | Description | Use Case |
|---|---|---|
| Password | Local username/password | Standalone deployments |
| OAuth2/OIDC | Third-party identity providers | Enterprise SSO |
| Combined | Both password and OAuth | Flexible access |
Password Authentication
Section titled “Password Authentication”Configuration
Section titled “Configuration”Password authentication is enabled by default. Configure settings at Admin > Authentication > Password Settings.
| Setting | Description | Default |
|---|---|---|
| Minimum Length | Minimum password characters | 8 |
| Require Uppercase | Must include uppercase letters | Yes |
| Require Lowercase | Must include lowercase letters | Yes |
| Require Numbers | Must include numeric characters | Yes |
| Require Special | Must include special characters | No |
| Password Expiry | Days until password expires | 0 (never) |
Password Reset
Section titled “Password Reset”Users can reset passwords via email if SMTP is configured:
- User clicks “Forgot Password” on login page
- Reset link sent to registered email
- User sets new password via link
- Old sessions are invalidated
OAuth2 / OpenID Connect
Section titled “OAuth2 / OpenID Connect”Supported Providers
Section titled “Supported Providers”SPEAR supports standard OAuth2/OIDC providers:
| Provider | Protocol | Notes |
|---|---|---|
| Google Workspace | OIDC | Email domain restriction available |
| Microsoft Entra ID | OIDC | Azure AD / Office 365 |
| GitHub | OAuth2 | Organization membership checks |
| GitLab | OAuth2 | Self-hosted supported |
| Okta | OIDC | Enterprise identity |
| Custom OIDC | OIDC | Any compliant provider |
Configuration Steps
Section titled “Configuration Steps”- Navigate to Admin > Authentication > OAuth Providers
- Click Add Provider
- Select provider type
- Enter configuration:
- Client ID
- Client Secret
- Redirect URI (provided by SPEAR)
- Additional scopes (if needed)
- Test the connection
- Enable the provider
Google Workspace Setup
Section titled “Google Workspace Setup”- Go to Google Cloud Console
- Create or select a project
- Navigate to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Web application
- Add authorized redirect URI from SPEAR
- Copy Client ID and Client Secret to SPEAR
Microsoft Entra ID Setup
Section titled “Microsoft Entra ID Setup”- Go to Azure Portal
- Navigate to Azure Active Directory > App registrations
- Click New registration
- Enter name and select supported account types
- Add redirect URI from SPEAR
- Copy Application (client) ID
- Create client secret under Certificates & secrets
- Configure in SPEAR
GitHub Setup
Section titled “GitHub Setup”- Go to GitHub Settings > Developer settings > OAuth Apps
- Click New OAuth App
- Enter application details
- Add authorization callback URL from SPEAR
- Copy Client ID and generate Client Secret
- Configure in SPEAR
Session Management
Section titled “Session Management”Session Settings
Section titled “Session Settings”Configure session behavior at Admin > Authentication > Sessions.
| Setting | Description | Default |
|---|---|---|
| Session Timeout | Inactive session expiry | 24 hours |
| Max Sessions | Maximum concurrent sessions per user | Unlimited |
| Remember Me | Extended session duration | 30 days |
| Secure Cookies | Require HTTPS for cookies | Auto |
Active Sessions
Section titled “Active Sessions”Users can view and manage their active sessions:
- Go to Account Settings > Sessions
- View list of active sessions with:
- Device/browser information
- IP address
- Last activity
- Click Revoke to end specific sessions
- Click Revoke All to end all other sessions
Admin Session Management
Section titled “Admin Session Management”Administrators can manage user sessions:
- Navigate to Admin > Security > Active Sessions
- View all active sessions across users
- Filter by user, IP, or activity
- Revoke sessions as needed
Multi-Factor Authentication
Section titled “Multi-Factor Authentication”Planned MFA methods:
- TOTP (Google Authenticator, Authy)
- WebAuthn / Passkeys
- Email verification codes
Single Sign-On (SSO)
Section titled “Single Sign-On (SSO)”SSO Behavior
Section titled “SSO Behavior”When OAuth providers are configured:
- User clicks provider button on login page
- Redirected to identity provider
- User authenticates with provider
- Redirected back to SPEAR with authorization code
- SPEAR exchanges code for user information
- User account created or linked automatically
- Session established
Account Linking
Section titled “Account Linking”When a user signs in via OAuth and an account with matching email exists:
- Auto-link enabled: Accounts are automatically linked
- Auto-link disabled: User must verify ownership first
Configure at Admin > Authentication > Account Linking.
Email Domain Restriction
Section titled “Email Domain Restriction”Restrict OAuth sign-ups to specific email domains:
- Go to Admin > Authentication > OAuth Providers
- Select provider
- Add allowed domains (e.g.,
yourcompany.com) - Save changes
Users with non-matching email domains cannot create accounts.
Just-In-Time Provisioning
Section titled “Just-In-Time Provisioning”When enabled, new users are automatically created on first OAuth login:
| Setting | Description |
|---|---|
| Auto-create users | Create account on first OAuth login |
| Default group | Group to assign new users |
| Email domain filter | Only provision from specific domains |
Configure at Admin > Authentication > Provisioning.
Security Recommendations
Section titled “Security Recommendations”For Password Authentication
Section titled “For Password Authentication”- Enable password complexity requirements
- Set password expiry for sensitive environments
- Configure account lockout after failed attempts
- Require password change on first login
For OAuth/SSO
Section titled “For OAuth/SSO”- Use OIDC over plain OAuth2 when available
- Restrict to specific email domains
- Disable password auth if SSO-only desired
- Monitor for unusual login patterns
General
Section titled “General”- Enable HTTPS (required for OAuth)
- Set appropriate session timeouts
- Regular audit log review
- Disable unused authentication methods
Troubleshooting
Section titled “Troubleshooting”OAuth Login Fails
Section titled “OAuth Login Fails”“Redirect URI mismatch”
- Verify redirect URI in provider matches exactly
- Check for http vs https mismatch
- Ensure no trailing slashes
“Invalid client”
- Verify Client ID is correct
- Check if credentials were rotated
“Access denied”
- User may not have permission in identity provider
- Check email domain restrictions
Password Reset Not Working
Section titled “Password Reset Not Working”- Verify SMTP is configured correctly
- Check spam/junk folders
- Verify user email address is correct
- Check SMTP logs for delivery errors
Session Issues
Section titled “Session Issues”User logged out unexpectedly
- Check session timeout settings
- Verify secure cookie settings match HTTPS status
- Check for IP address changes (VPN, mobile)
Can’t maintain session
- Clear browser cookies
- Check browser privacy settings
- Verify clock synchronization