Github OAuth breaks on second OAuth attempt, after first prompt was denied by user.
nlflint opened this issue · 0 comments
nlflint commented
Repo steps:
- Setup Alexandrie with Github integration and allow registration
- Open a private browsing session (or logout of github and alexandrie).
- Go to your alexandrie page
- Click "Login with github" button.
- Login to github with a user that is not yet linked to alexandrie
- Observe Github OAuth prompt
- Deny the prompt
- Go back to Alexandrie page
- Click login with github again
- 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?