-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve login error behavior #438
Conversation
…ks backswards compatibility check
# Conflicts: # client/package-lock.json # client/package.json # core/examples/luigi-sample-angular/package-lock.json # core/examples/luigi-sample-angular/package.json # core/package-lock.json # core/package.json # core/public/package.json
# Conflicts: # core/src/Alert.html
}, 50); | ||
}) | ||
.catch(err => { | ||
console.error(err); | ||
reject(err); | ||
localStorage.clear(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Is it not too harsch to clear the whole local storage? It would be more polite to just clear keys this auth provider handles.
- Do we clear auth data in non-error logout flows as well?
- Is there a reason to not use session storage for the auth data?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right. We usually use localStorage.removeItem('luigi.auth');
upon errors and normal logout. I guess localStorage is used to be able to close the window and still be logged in without going trough sso flow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please doublecheck with Philipp if he is fine with using localStorae here, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works well but I also vote for using sessionStorage
✌️
We have relied on localStorage so far, changing it to sessionStorage would be breaking change. Maybe we should add a config setting so the user can switch which storage method he wants to use. Should be done in separate ticket. |
improved oidc provider error handling
Redirecting now to logout.html after token issues.
Could be tested in combination with https://github.com/kyma-project/console/pull/720