✨ Key Highlights
- Functional Configuration: Simplify setup with
provideKeycloak—no moreKeycloakServiceorKeycloakAngularModule. - Angular Signals: Reactive handling of Keycloak events for a cleaner, modern approach.
- Enhanced Interceptors: Add tokens with explicit configuration using
includeBearerTokenInterceptorandcustomBearerTokenInterceptor. - Role-Based Rendering: New
*kaHasRolesdirective for conditional rendering based on roles. - Modular Features: Introduced
withAutoRefreshTokenfor seamless token refresh and session management. - Functional Route Guards: Create custom guards with
createAuthGuardfor streamlined route protection.
⚠️ Breaking Changes
- Deprecated
KeycloakService,KeycloakAngularModule,KeycloakAuthGuard, andkeycloakEvents$. - Bearer tokens are no longer added automatically to all HTTP requests—explicit configuration required.
🛠️ Legacy Version Still Bundled
The legacy implementation of Keycloak-Angular (KeycloakService, KeycloakAngularModule, etc.) is still bundled in this release for backward compatibility. However, it is deprecated and will be removed in a future major version. We strongly encourage migrating to the new APIs.
🛠️ Migration Guide
See the migration guide. 🚀