-
-
Notifications
You must be signed in to change notification settings - Fork 361
Closed
Description
Describe the bug
When Gitea OAuth is used for logging in, external user ID is not properly recorded in oauth_users.remote_user_id
which causes misbehavior when logging in with different external users from Gitea server.
Steps to reproduce
Steps to reproduce the behavior:
- Login to WriteFreely with
user_a
; - Associate
user_a
with Gitea usergitea_user_a
; - Login to WriteFreely with
user_b
; - Associate
user_b
with Gitea usergitea_user_b
; - Attempt to login with Gitea user
gitea_user_b
- you will be logged in asuser_a
while it is expected to beuser_b
.
Expected behavior
Expected behavior is logging in with gitea_user_a
logs into user_a
while gitea_user_b
logs into user_b
.
Application configuration
- Single mode or Multi-user mode? Multi-user
- Database? [mysql/sqlite] MySQL
- Open registration? [yes/no] Yes and No
- Federation enabled? [yes/no] Yes
Version or last commit: v0.13.1
To solve this issue it is required to add extra auth fields into Gitea implementation code in the same way as they are available in oauth_generic.go
. Pull request will be submitted in a moment.