feat: support mapping avatar url from oauth2

This commit is contained in:
johnnyjoy
2025-04-24 10:07:24 +08:00
parent e41916408a
commit eb33a604b2
11 changed files with 113 additions and 256 deletions

View File

@@ -129,9 +129,10 @@ func (s *APIV1Service) SignInWithSSO(ctx context.Context, request *v1pb.SignInWi
userCreate := &store.User{
Username: userInfo.Identifier,
// The new signup user should be normal user by default.
Role: store.RoleUser,
Nickname: userInfo.DisplayName,
Email: userInfo.Email,
Role: store.RoleUser,
Nickname: userInfo.DisplayName,
Email: userInfo.Email,
AvatarURL: userInfo.AvatarURL,
}
password, err := util.RandomString(20)
if err != nil {