OAuth Settings
Configure OAuth and SSO authentication providers for secure login in ISPBills.
ISPBills supports OAuth-based Single Sign-On (SSO), allowing administrators and customers to authenticate using external identity providers. This simplifies the login experience and centralizes credential management.
OAuth settings affect the login page for all users. Test your configuration thoroughly before enabling it in production.
Overview
The OAuthSettingController manages OAuth provider configuration, including client credentials, redirect URIs, and scope definitions. Once configured, users see additional login options on the authentication page.
Supported Providers
ISPBills can integrate with any OAuth 2.0 compliant provider. Common providers include:
| Provider | Protocol | Notes |
|---|---|---|
| OAuth 2.0 | Workspace and personal accounts | |
| OAuth 2.0 | Useful for customer-facing portals | |
| GitHub | OAuth 2.0 | Suitable for technical teams |
| Custom / Self-hosted | OAuth 2.0 / OpenID Connect | For organizations with their own identity server |
You can enable multiple providers simultaneously. Each will appear as a separate login option.
Configuring OAuth
To set up a new OAuth provider:
- Navigate to the OAuth settings page.
- Select the provider type or choose custom for unsupported providers.
- Enter the required credentials:
- Client ID — obtained from the provider's developer console.
- Client Secret — obtained alongside the Client ID.
- Authorization URL — the provider's authorization endpoint.
- Token URL — the provider's token exchange endpoint.
- Redirect URI — ISPBills generates this automatically; register it with the provider.
- Configure the requested scopes (e.g.,
email,profile). - Map provider fields to ISPBills user attributes (email, name, etc.).
- Save and test the configuration.
Never share your Client Secret publicly. Store it securely and rotate it periodically according to your security policy.
Login Flow
When OAuth is enabled, the login process works as follows:
- The user visits the ISPBills login page.
- They click on the desired OAuth provider button.
- The browser redirects to the provider's authentication page.
- The user authenticates with the provider (enters credentials, completes MFA, etc.).
- The provider redirects back to ISPBills with an authorization code.
- ISPBills exchanges the code for an access token and retrieves the user's profile.
- If the profile matches an existing account, the user is logged in. Otherwise, a new account may be created based on your configuration.
Security Considerations
Misconfigured OAuth can create security vulnerabilities. Review these points carefully.
- Restrict allowed domains — If using Google OAuth, limit to your organization's domain to prevent unauthorized access.
- Enforce HTTPS — OAuth requires secure connections. Ensure your ISPBills instance uses a valid SSL certificate.
- Token storage — Access tokens are stored securely server-side. They are never exposed to the browser.
- Session management — OAuth sessions respect ISPBills' session timeout settings.
- Account linking — Decide whether OAuth logins should auto-create accounts or only link to existing ones.
- Audit logging — All OAuth login events are recorded in the system audit log for monitoring.