Skip to content

Commit

Permalink
Merge pull request #14 from henricook/extra-log
Browse files Browse the repository at this point in the history
Add a log entry if JWT parsing fails
  • Loading branch information
ryanm101 authored Nov 6, 2023
2 parents d4458a4 + b3843ba commit 7613600
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/iap/cookie.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ func parseJWToken(rawToken string) (jwt.Token, jwt.StandardClaims, error) {
var claims jwt.StandardClaims

token, _, err := p.ParseUnverified(rawToken, &claims)
if err != nil {
log.Debug().Msgf("Token parse failed. It might not have refreshed properly. Is your account locked or invalid? If not: Try clearing ~/.git-credentials and ~/.config/gcp-iap/*.cookie")
}
return *token, claims, err
}

Expand Down

0 comments on commit 7613600

Please sign in to comment.