Authentication Options
Machine-to-Machine (M2M)
Client Credentials FlowFor server-to-server integrations where no user interaction is required. Your backend services authenticate directly using a Client ID and Client Secret.Best for:
- Backend integrations
- Automated data sync
- Batch processing
- Cron jobs
User Authentication
Authorization Code FlowFor applications that need to authenticate end users. Users are redirected to SmarterServices to login, then your application receives tokens to access user data.Best for:
- Web applications
- Single sign-on (SSO)
- User portals
- Third-party integrations
Quick Comparison
OIDC Discovery
SmarterServices implements OpenID Connect Discovery 1.0. You can retrieve provider configuration metadata from:Common Endpoints
Common Security Practices
- Store credentials securely - Never expose Client ID/Secret in client-side code
- Use HTTPS - All redirect URIs must use HTTPS
- Validate tokens - Check expiration before using tokens
- Verify token signatures - Use the JWKS endpoint to verify JWT signatures
- Handle 401/403 errors - Implement proper error handling for authentication failures
- Use PKCE - Required for public clients (SPAs, mobile apps), recommended for all
Next Steps
Choose the authentication flow that fits your use case:- Machine-to-Machine → - If you’re building a backend integration
- User Authentication → - If you need users to login to your application
