Skip to content

[BUG] Improve handling of cancelled GitHub OAuth login (shows 401 instead of user-friendly message) #7407

@hirdeshds

Description

@hirdeshds

Describe the bug

When a user tries to sign up/login using GitHub OAuth and clicks "Cancel" instead of "Authorize",
the application returns a raw error response:

"No user information from OAuth provider" with status 401 Unauthorized.

This is not user-friendly and misleading, as the user intentionally cancelled the login process.

Steps To Reproduce

  1. Go to the signup/login page
  2. Click on "Sign in with GitHub"
  3. On the GitHub authorization screen, click "Cancel"
  4. Observe the error response shown on the screen
Image

Expected behavior

When the user cancels the OAuth flow, the application should detect the
error=access_denied parameter and display a user-friendly message such as:

"Login cancelled by user" or "Authorization was denied"

Instead of showing a 401 Unauthorized error.

Image

Packages

(Not sure / can be filled by running npm run refine whoami if required)

Additional Context

The backend seems to assume that OAuth always succeeds and does not handle
the cancellation (error=access_denied) case properly.

Handling this case will improve user experience and prevent confusing error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions