IdentityModel / oidc-client-js

OpenID Connect (OIDC) and OAuth2 protocol support for browser-based JavaScript applications
Apache License 2.0
2.43k stars 842 forks source link

Redirect to login page after logout from client with data needed for relogging to client #1304

Closed Adishone closed 3 years ago

Adishone commented 3 years ago

Hello,

I'm using Angular client application with IdentityServer. Everything works great, but I have one small issue: When I use a logout function in my angular client I would like to be redirected to login page that is MVC View of Identity Server 4 (https://identityserver/account/login), but after relog I would like to be redirected back to my angular client. I achieved it by setting post_logout_redirect to https://angular-client/login-redirect and this login-redirect component is redirecting user again by calling authService.signInRedirect(), but I feel like I'm doing at least one unnecessary redirect. I felt like it is needed to generate right state and nonce parameter. Am I right and this step have to be done or I could skip it somehow?

brockallen commented 3 years ago

That's something you'd have to sort out in the STS. It's not really something you'd control from this library.