Skip to content

Commit

Permalink
Merge pull request #144 from Tenderly/delta003-patch-1
Browse files Browse the repository at this point in the history
Enable logout when login via token
  • Loading branch information
delta003 authored Apr 21, 2023
2 parents 35e65d3 + e40d9cd commit 585eeb3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions commands/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ var logoutCmd = &cobra.Command{
return
}

rest := NewRest()
emailLogout(rest)
if config.GetAccessKeyId() != "" {
// If logged in via token, don't revoke provided token.
rest := NewRest()
emailLogout(rest)
}

config.SetGlobalConfig(config.Token, "")
config.SetGlobalConfig(config.AccessKey, "")
Expand Down

0 comments on commit 585eeb3

Please sign in to comment.