Skip to content

Commit

Permalink
Add a log entry if JWT parsing fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Cook committed Nov 3, 2023
1 parent d4458a4 commit b3843ba
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 b3843ba

Please # to comment.