angularjs-oauth / oauth-ng

AngularJS directive for the OAuth 2.0 Implicit Flow
http://angularjs-oauth.github.io/oauth-ng/
MIT License
363 stars 156 forks source link

logging out then redirecting browser quickly does not allow session storage to flush #86

Open GregTurner opened 9 years ago

GregTurner commented 9 years ago

On some system logging out redirects to an SSO logout. However if you redirect the browser too quickly, the session storage persists and the user remains logged into the angularjs app.

Tracked down this issue to here:

https://github.com/gsklee/ngStorage/issues/39

The workaround (as suggested in ngStorage issue) is to wait for >100ms for session storage to flush, see here:

        $timeout(function () {
            $window.location = "http://localhost:9070/authserver/logout?redirect_uri=" + window.encodeURIComponent($location.absUrl());
        }, 110);
m00s commented 9 years ago

Thank you @GregTurner. Gonna fix that in the next release!