Keycloak Session Check of ImplicitFlow Received 403
See original GitHub issueAngular 7 Keycloak 4.6.0 Lib 5.0.2
Everything else is working except when the Lib trying to check the session status using the following GET, it got the 403 returns from Keycloak.
GET http://devvm:8080/auth/realms/demo/protocol/openid-connect/login-status-iframe.html/init?client_id=test&origin=http%3A%2F%2Flocalhost%3A4200 403 (Forbidden)
checkState @ login-status-iframe.html:70
receiveMessage @ login-status-iframe.html:109
And here is my AuthConfig:
authConfig: AuthConfig = {
issuer: 'http://devvm:8080/auth/realms/demo',
clientId: 'test',
redirectUri: window.location.origin + '/index.html',
silentRefreshRedirectUri: window.location.origin + '/silent-refresh.html',
scope: 'openid profile email',
sessionChecksEnabled: true,
requireHttps: false,
showDebugInformation: false
};
And the Lib initialization:
configure() {
this.oauthService.configure(this.authConfig);
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.events.subscribe(e => this.handleEvent(e));
this.oauthService.loadDiscoveryDocument()
.then(() => this.oauthService.tryLogin())
.then(() => {
if (!this.oauthService.hasValidAccessToken()) {
return this.oauthService.silentRefresh();
}
});
this.oauthService.setupAutomaticSilentRefresh();
}
Please any help to the issue is appreciated 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:6
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had same issue, resolved by setting client “Web origins” to “*”.
“+” is also working fine, whilst not allowing access from everywhere, just from the registered callback urls.