Skip to content

Commit

Permalink
Fixed the issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
p0t4t0sandwich committed Apr 24, 2024
1 parent bd697b6 commit dc8c60c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion modules/auth/linking/discord.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func DiscordOAuth(as auth.AccountStore, ss sess.SessionStore, las LinkAccountSto

// Check if platform account is linked to an account
la, err := las.GetLinkedAccountByPlatformID(PlatformDiscord, user.ID)
if err != nil {
if err == nil {
// If the account IDs don't match, default to OAuth as the source of truth
if a == nil || a.UserID != la.UserID {
a, err = as.GetAccountByID(la.UserID)
Expand Down
4 changes: 1 addition & 3 deletions modules/auth/linking/twitch.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,7 @@ func TwitchOAuth(as auth.AccountStore, ss sess.SessionStore, las LinkAccountStor

// Check if platform account is linked to an account
la, err := las.GetLinkedAccountByPlatformID(PlatformTwitch, user.ID)
log.Println(la)
log.Println(err)
if err != nil {
if err == nil {
// If the account IDs don't match, default to OAuth as the source of truth
if a == nil || a.UserID != la.UserID {
a, err = as.GetAccountByID(la.UserID)
Expand Down

0 comments on commit dc8c60c

Please sign in to comment.