-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Discord OAuth broken: OAuth2 Provider discord returned empty or missing fields: [nickname] #24957
Comments
This is likely solved by https://codeberg.org/forgejo/forgejo/pulls/1757 |
I faced this issue, and the only workaround for now seems to NOT use You can still use |
Forgejo v1.21.2-0 has a fix for this: so that registration is still instantaneous for accounts which provide all of the required information (username and email), with a fallback on the |
-> Improve oauth2 client "preferred username field" logic and the error handling #30622 |
…handling (#30622) Follow #30454 And fix #24957 When using "preferred_username", if no such field, `extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an error. All other USERNAME options do not return such error. And fine tune some logic and error messages, make code more stable and more friendly to end users.
Description
I have only external registration allowed on my instance and discord is one of external OAuth providers.
When trying to log in with discord, i get 500:
I tried setting run mode to debug and log level to trace, didnt get anything useful.
Relevant parts of config:
Setting
oauth2_client.USERNAME
to"userid"
partially solves it, user can be registered:I get another 500 page but user is created and seem to work fine after going to main page.
userid
setting locks user's username to discord id which is undesirable and it also affects other OAuth providers.Full name field is correctly set to discord account name this way though.
Note that i am creating new user. This email does not exist in gitea so no account linking happens, this is registration
Gitea Version
1.19.3
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Compiled from source
Database
SQLite
The text was updated successfully, but these errors were encountered: