Skip to content

Github OAuth breaks on second OAuth attempt, after first prompt was denied by user. #187

@nlflint

Description

@nlflint

Repo steps:

  1. Setup Alexandrie with Github integration and allow registration
  2. Open a private browsing session (or logout of github and alexandrie).
  3. Go to your alexandrie page
  4. Click "Login with github" button.
  5. Login to github with a user that is not yet linked to alexandrie
  6. Observe Github OAuth prompt
  7. Deny the prompt
  8. Go back to Alexandrie page
  9. Click login with github again
  10. Accept the OAuth prompt this time

Expected Result: Redirected to callback and logged into main page successfully.

Actual Result: Callback to Alexandrie fails with HTTP 500.

Workaround: I entered the sqlite database and saw the user was added to a 3 tables. I deleted all rows for that half-initialized user, tried again (without denying OAuth this time), and user was added without a problem. Maybe it's using the old auth token initially added to the database instead of the new one?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions