I tried to setup gitea as a oauth provider for my new penpot instance. However I always got errors from penpot that something is wrong (described here penpot/penpot#1802). After a while of debugging, I found out, that the empty name in the user_info response of the oauth process is causing that problems.
// GET http://myserver:3333/login/oauth/userinfo{"sub": "2","name": "","preferred_username": "user1","email": "[email protected]","picture": "http://myserver:3333/avatar/XXXXXXXXXXXXXXXXXX","groups": null}
However I feel like returning the value of preferred_username in the name field instead of an empty name (which can cause many issues) would be a good choice.
Screenshots
No response
The text was updated successfully, but these errors were encountered:
The primary username that represents the user. It could be an email address, phone number, or a generic username without a specified format. Its value is mutable and might change over time. Since it is mutable, this value must not be used to make authorization decisions. It can be used for username hints, however, and in human-readable UI as a username. The profile scope is required in order to receive this claim. Present only in v2.0 tokens.
name
String
The name claim provides a human-readable value that identifies the subject of the token. The value isn't guaranteed to be unique, it can be changed, and it's designed to be used only for display purposes. The profile scope is required to receive this claim.
And the fix could be easy:
change the Name: ctx.Doer.FullName, to Name: ctx.Doer.GetDisplayName(), in auth/oauth.go.
Feature Description
I tried to setup gitea as a oauth provider for my new penpot instance. However I always got errors from penpot that something is wrong (described here penpot/penpot#1802). After a while of debugging, I found out, that the empty name in the
user_info
response of the oauth process is causing that problems.However I feel like returning the value of
preferred_username
in the name field instead of an empty name (which can cause many issues) would be a good choice.Screenshots
No response
The text was updated successfully, but these errors were encountered: