1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2025-11-23 21:44:44 +02:00

Identify users using their remote ID (#1732)

This commit is contained in:
qwerty287
2023-05-11 05:19:35 +02:00
committed by GitHub
parent 02cfbc8cbf
commit 6d2240b2e6
14 changed files with 101 additions and 47 deletions

View File

@@ -129,10 +129,11 @@ func (c *client) Login(ctx context.Context, res http.ResponseWriter, req *http.R
}
return &model.User{
Login: *user.Login,
Email: *email.Email,
Token: token.AccessToken,
Avatar: *user.AvatarURL,
Login: user.GetLogin(),
Email: email.GetEmail(),
Token: token.AccessToken,
Avatar: user.GetAvatarURL(),
ForgeRemoteID: model.ForgeRemoteID(fmt.Sprint(user.GetID())),
}, nil
}