How to handle SSR with provideKeycloak in Angular’s appConfig?
I am working on an Angular application with SSR, and I’m trying to upgrade my project to angular 19. I’m using the new keycloak-angular provideKeycloak for authentication.
My current configuration works fine in a browser environment, but I encounter issues when running it in an SSR environment because window is not available on the server.
keycloak-angular with standalone components TypeError on login()
I’m attempting to setup keycloak-angular in a v18 SPA following this approach which seems to have had historic success. When calling the login method keycloak.login()
I receive the following error which I’ve been unable to resolve, any ideas on what’s causing / how to proceed?: