- About
- Core technologies
- Requirements
- Getting started
- Dashboard
- Configuration Overview
- General
- License
- Resource Configuration
- Security & Flow Setup
- Certificates
- Identity
- Rate limiting
- Cors
- LoginProvider
- Advanced configuration
- Theme builder
- Email template builder
- Health checks
- What's New
- Migration guides
- Changelog
OpenIddict Security & Flow Setup
Token lifetimes, OAuth flows, and security validation settings
Token Lifetimes Configuration
Token lifetimes define how long different types of tokens remain valid before expiring. Proper configuration balances security with user experience.
Token Types and Their Purpose:
Recommended Timeframes:
- • Authorization Codes: 1-5 minutes (short-lived for security)
- • Access Tokens: 1-24 hours (balance security vs API calls)
- • Identity Tokens: 30 minutes - 1 hour (UI session duration)
- • Refresh Tokens: Days to weeks (long-term access renewal)
Token Configuration
Token configuration settings control how tokens are handled, validated, and referenced within the OpenIddict server. These settings affect token behavior and client token management strategies.
Key Token Settings:
Reference vs Self-Contained Tokens:
- • Immediate revocation capability
- • Smaller token size
- • Better audit trail
- • Enhanced security control
- • No database lookup required
- • Better performance
- • Stateless validation
- • Distributed system friendly
Requirements
Requirements settings enforce additional security measures and compliance standards. These settings help ensure that clients and requests meet specific security criteria before processing.
Security Requirements:
Implementation Notes:
- • PKCE should be required for all public clients (mobile apps, SPAs)
- • Pushed Authorization Requests are part of the latest OAuth security best practices
- • These requirements may break compatibility with older client implementations
- • Test thoroughly with your client applications before enabling in production
Flow Configuration
OAuth 2.0 and OpenID Connect flows define how clients obtain tokens. Each flow is designed for specific application types and security requirements. This is a critical configuration section that determines which authentication methods your server supports.
Core Flow Types:
Authorization Code Flow
Most secure flow for web applications. Client receives authorization code, exchanges it for tokens. Recommended for server-side web apps.
Hybrid Flow
Combination of authorization code and implicit flows. Provides both front-channel and back-channel tokens. Suitable for applications needing immediate token access.
Client Credentials Flow
Machine-to-machine authentication. No user interaction required. Essential for API-to-API communication.
Device Authorization Flow
For devices with limited input capabilities (smart TVs, IoT devices). User authenticates on a separate device.
Additional Flow Options:
Security Considerations:
- • Disable flows not used by your applications
- • Implicit flow is deprecated - use Authorization Code with PKCE instead
- • Password flow should only be used for trusted first-party applications
- • Always require HTTPS in production environments
ASP.NET Core Configuration
ASP.NET Core specific configuration settings that control how OpenIddict integrates with the ASP.NET Core pipeline and handles various framework-specific features.
Core Integration Settings:
Additional Features:
IdentitySuite Library Integration
Important: When using the IdentitySuite library, all passthrough settings should remain enabled as the library provides custom endpoint implementations that enhance OpenIddict's default functionality. These custom endpoints include improved UI, additional validation logic, seamless integration with IdentitySuite's user management features, and full compliance with OpenID Connect certification requirements.
Only disable passthrough settings if you want to revert to OpenIddict's default endpoint behavior, which will bypass IdentitySuite's custom implementations and may result in reduced functionality.
When to Use Passthrough:
- • Custom authorization UI that doesn't fit OpenIddict's default handling
- • Additional business logic validation before token issuance
- • Integration with existing ASP.NET Core authentication systems
- • Custom claims transformation or user information enrichment
- • Specialized logout procedures or session management
Validation & Security Configuration
Security and validation settings provide additional layers of protection and control over token validation, data protection, and endpoint security. These settings help ensure compliance with OAuth 2.0 and OpenID Connect specifications.
Validation Settings:
Security Features:
Endpoint Security:
Best Practices:
- • Enable data protection in production environments
- • Use token entry validation for enhanced security
- • Enable endpoint passthrough only when custom logic is required
- • Regularly review and audit enabled security features
- • Consider token encryption for highly sensitive applications