Skip to content

Commit a1f3d5c

Browse files
committed
feat: retrieve GitHub username via OAuth
1 parent 963f69d commit a1f3d5c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

api/provider/github.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ type githubProvider struct {
2222
}
2323

2424
type githubUser struct {
25+
UserName string `json:"login"`
2526
Email string `json:"email"`
2627
Name string `json:"name"`
2728
AvatarURL string `json:"avatar_url"`
@@ -75,6 +76,7 @@ func (g githubProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*Us
7576

7677
data := &UserProvidedData{
7778
Metadata: map[string]string{
79+
userNameKey: u.UserName,
7880
nameKey: u.Name,
7981
avatarURLKey: u.AvatarURL,
8082
},

0 commit comments

Comments
 (0)