Skip to content

Commit

Permalink
Fix bug in IsTokenExpired().
Browse files Browse the repository at this point in the history
  • Loading branch information
hsluoyz committed Feb 5, 2022
1 parent 940aa2b commit 0720794
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ func GetCurrentUnixTime() string {
func IsTokenExpired(createdTime string, expiresIn int) bool {
createdTimeObj, _ := time.Parse(time.RFC3339, createdTime)
expiresAtObj := createdTimeObj.Add(time.Duration(expiresIn) * time.Minute)
return time.Now().Before(expiresAtObj)
return time.Now().After(expiresAtObj)
}

0 comments on commit 0720794

Please sign in to comment.