IdentityModel / oidc-token-manager

Apache License 2.0
51 stars 36 forks source link

Q: redirectForLogout not redirecting back to logout uri #49

Closed tonyeung closed 8 years ago

tonyeung commented 8 years ago

When I call redirectForLogout() it goes to idsvr to logout, but then it stays on the page "You are now logged out". The redirect uris are whitelisted in the client configuration.

Below are the settings I have on the client.

Am I forgetting something?

https://idsvr/connect/endsession?post_logout_redirect_uri=http%3A%2F%2Fspadomain%2Flogin&id_token_hint=hint

    var settings = {
        //required
        authority: 'https://idsvr',
        client_id: 'someClient',
        redirect_uri: 'http://spadomain/login',
        response_type: 'id_token token',
        scope: 'openid someScope api',

        post_logout_redirect_uri: 'http://spadomain/login',  
        silent_redirect_uri: 'http://spadomain/renew-token.html',          
        filter_protocol_claims: true, // remove OIDC specific claims
        request_state_store: sessionStorage, // window.localStorage is default. Does not work well with multiple tabs open.
        silent_renew: true
    };
brockallen commented 8 years ago

Does IdSvr show the link to return back to your client app?

tonyeung commented 8 years ago

It does not.

Below is a screenshot of what I see after IdSvr is done with logout. The url when you hover on "Identity Server 3" is the url of IdSvr rather than the login page I specified as the post logout redirect url.

screenshot

tonyeung commented 8 years ago

My bad, I didn't know there was a client setting specifically for logout redirects. I need to see if there's a way to make IdSvr do an actual redirect instead of just showing thing link though. If I need help, I'll post a question in the IdSvr repo

tonyeung commented 8 years ago

For anyone else that encounters this - I was missing the EnablePOstSignOutAutoRedirect setting on the AuthenticationOptions: https://identityserver.github.io/Documentation/docsv2/configuration/authenticationOptions.html