我有一个角度5应用程序,其中我已经实现了angular2-oauth-oidc和okta .
当我尝试注销时,我收到400 Bad Request错误,说Invalid_token . Session 似乎已经过期了 .
在单击注销按钮时,用于注销的代码如下:
this.oauthService.logOut();
我的app.component.ts文件:
this.oauthService.redirectUri = window.location.origin;
this.oauthService.clientId = oktaClientId;
this.oauthService.scope = 'openid profile email';
this.oauthService.issuer = 'https://aaaa.oktapreview.com';
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
this.oauthService.setupAutomaticSilentRefresh();
// Load Discovery Document and then try to login the user
this.oauthService.loadDiscoveryDocument().then(() => {
this.oauthService.tryLogin({
onTokenReceived: (info) => {
this.router.navigate([info.state]);
}
});
会话过期后,请帮助处理注销 . 提前致谢 .