✨ Key Highlights
- Functional Configuration: Simplify setup with
provideKeycloak
—no moreKeycloakService
orKeycloakAngularModule
. - Angular Signals: Reactive handling of Keycloak events for a cleaner, modern approach.
- Enhanced Interceptors: Add tokens with explicit configuration using
includeBearerTokenInterceptor
andcustomBearerTokenInterceptor
. - Role-Based Rendering: New
*kaHasRoles
directive for conditional rendering based on roles. - Modular Features: Introduced
withAutoRefreshToken
for seamless token refresh and session management. - Functional Route Guards: Create custom guards with
createAuthGuard
for 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. 🚀