Skip to content

Commit 0855eea

Browse files
authored
fix: add discord id to user_metadata (#136)
1 parent dfa3146 commit 0855eea

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

api/provider/discord.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ func (g discordProvider) GetUserData(ctx context.Context, tok *oauth2.Token) (*U
8888

8989
return &UserProvidedData{
9090
Metadata: map[string]string{
91-
nameKey: u.Name,
92-
avatarURLKey: avatarURL,
91+
avatarURLKey: avatarURL,
92+
nameKey: u.Name,
93+
providerIdKey: u.Id,
9394
},
9495
Emails: []Email{{
9596
Email: u.Email,

api/provider/provider.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ import (
88
)
99

1010
const (
11-
userNameKey = "user_name"
12-
avatarURLKey = "avatar_url"
13-
nameKey = "full_name"
14-
aliasKey = "slug"
11+
userNameKey = "user_name"
12+
avatarURLKey = "avatar_url"
13+
nameKey = "full_name"
14+
aliasKey = "slug"
15+
providerIdKey = "provider_id"
1516
)
1617

1718
type Email struct {

0 commit comments

Comments
 (0)