I'am using the angular-oauth2-oidc libary with keycloak as an Auth-Provider in my angular app. Everything works fine in the "happy-path":
- User hits the login button
- Calling the initImplicitFlow method
- The keycloak login-page shows up
- User enters his credentials
- Redirection to angular-app
But when the user clicks the back-navigation button from the browser on the Keycloak-page and then again tries to log in by hitting the login-button in the angular-app, nothing happens. No redirection to Keycloak. Only when I'm realoading the page or manually navigate to the app-root it works again.
This behaviour only occurs in the Firefox and works fine in Chrome or even Internet Explorer or Edge. Perhaps someone knows an solution to it :)
My authConfig:
export const authConfig: AuthConfig = {
// Url of the Identity Provider
issuer: AppSettings.AUTH_SERVER,
// URL of the SPA to redirect the user to after login
redirectUri: window.location.origin + "/index.html",
// The SPA's id. The SPA is registerd with this id at the auth-server
clientId: "angular-app-1",
showDebugInformation: true,
silentRefreshRedirectUri: window.location.origin + "/silent-refresh.html",
// set the scope for the permissions the client should request
// The first three are defined by OIDC. The 4th is a usecase-specific one
scope: "openid profile email dashboardapi_user"
};
I don't know if has anything to do with the problem, but I'am using the HashLocationStrategy for routing.
I'm also using Angular 6, Keycloak version 3.2.1.Final and the angular-oauth2-oidc version 4.0.2