Skip to content

Commit

Permalink
Hotfix, refresh token reporting longer than it is refreshable
Browse files Browse the repository at this point in the history
  • Loading branch information
null93 committed Jul 2, 2024
1 parent fab7c13 commit 5bd4da3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sdk/tui/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ var (
)

func ClientLogin(session *credentials.Session) error {
if session.ClientCredentials != nil && !session.ClientCredentials.IsExpired() {
session.RefreshToken()
}
if session.ClientCredentials == nil || session.ClientCredentials.IsExpired() {
if err := session.RegisterClient(); err != nil {
return err
Expand Down Expand Up @@ -53,8 +56,6 @@ func ClientLogin(session *credentials.Session) error {
if err != nil {
return err
}
} else if err := session.RefreshToken(); err != nil {
return err
}
if err := session.Save(); err != nil {
return err
Expand Down

0 comments on commit 5bd4da3

Please sign in to comment.