Skip to content

Commit

Permalink
fix: remove mas-sso tokens on login (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki authored Jul 7, 2022
1 parent 82f8289 commit 92d1b41
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pkg/core/auth/login/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ func (a *AuthorizationCodeGrant) Execute(ctx context.Context,
}

if !hacks.ShouldUseMasSSO(a.Logger, apiUrl) {
cfg, err := a.Config.Load()
if err != nil {
return err
}
cfg.MasAccessToken = ""
cfg.MasRefreshToken = ""
err = a.Config.Save(cfg)
if err != nil {
return err
}
return nil
}

Expand Down

0 comments on commit 92d1b41

Please sign in to comment.