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

Use nicer error message for login nonce error #13432

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nwmac
Copy link
Member

@nwmac nwmac commented Feb 17, 2025

Summary

Fixes #13256

Occurred changes and/or fixed issues

This PR adds handling of the nonce error and displays a non-offensive error in this case.

Testing is difficult, since its hard to generate this error case, however, this has been implemented such that the handling is done in the login page, so you can test by going to:

https://<RANCER_URL/auth/login?err=nonce

You should now see the friendly error message instead of the previous error message.

Screenshot/Video

After this PR:

image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

Copy link
Member

@richard-cox richard-cox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a 50/50 comment, but could merge without it.

Also gave it a test with github and manually breaking the nonce, functionality worked fine

export const LOGIN_ERRORS = {
CLIENT: 'client',
CLIENT_UNAUTHORIZED: 'client_unauthorized',
SERVER: 'server'
SERVER: 'server',
NONCE: 'nonce',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wondered if we should also change this, as it's in the url. higher risk, it's not an un-factual state and would help product support though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rewrite OAuth login errors
2 participants