Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
chore: set empty access token
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jun 12, 2024
1 parent 29d3e16 commit 1adf8a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alby/alby_oauth_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (svc *albyOAuthService) CallbackHandler(ctx context.Context, code string) e
if err != nil {
svc.logger.WithError(err).Error("Failed to fetch user me")
// remove token so user can retry
svc.config.SetUpdate(accessTokenKey, me.Identifier, "")
svc.config.SetUpdate(accessTokenKey, "", "")
return err
}

Expand All @@ -91,7 +91,7 @@ func (svc *albyOAuthService) CallbackHandler(ctx context.Context, code string) e
svc.config.SetUpdate(userIdentifierKey, me.Identifier, "")
} else if me.Identifier != existingUserIdentifier {
// remove token so user can retry with correct account
svc.config.SetUpdate(accessTokenKey, me.Identifier, "")
svc.config.SetUpdate(accessTokenKey, "", "")
return errors.New("Alby Hub is connected to a different alby account. Please log out of your Alby Account at getalby.com and try again.")
}

Expand Down

0 comments on commit 1adf8a7

Please sign in to comment.