Skip to content
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

Merged
merged 12 commits into from
Apr 2, 2019
Merged

Conversation

maxmarkus
Copy link
Contributor

Redirecting now to logout.html after token issues.
Could be tested in combination with https://github.com/kyma-project/console/pull/720

@parostatkiem-zz parostatkiem-zz self-assigned this Mar 27, 2019
@y-kkamil y-kkamil self-assigned this Mar 27, 2019
}, 50);
})
.catch(err => {
console.error(err);
reject(err);
localStorage.clear();
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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!

@pekura
Copy link
Contributor

pekura commented Mar 27, 2019

The logout page is not a beauty:

Bildschirmfoto 2019-03-27 um 10 19 17

Can we improve that a bit?

@y-kkamil y-kkamil removed their assignment Mar 27, 2019
Copy link
Contributor

@parostatkiem-zz parostatkiem-zz left a 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 ✌️

@maxmarkus
Copy link
Contributor Author

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.

@kwiatekus kwiatekus modified the milestones: Sprint_Swinka_10, Sprint_Swinka_11 Mar 29, 2019
@maxmarkus maxmarkus merged commit f31299d into SAP:master Apr 2, 2019
@maxmarkus maxmarkus deleted the improve-login-issues branch April 2, 2019 13:00
@pekura pekura added the enhancement New feature or request label Apr 12, 2019
stanleychh pushed a commit to stanleychh/luigi that referenced this pull request Dec 30, 2021
improved oidc provider error handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants