Skip to content

Commit b3843ba

Browse files
author
Henri Cook
committed
Add a log entry if JWT parsing fails
1 parent d4458a4 commit b3843ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

internal/iap/cookie.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ func parseJWToken(rawToken string) (jwt.Token, jwt.StandardClaims, error) {
162162
var claims jwt.StandardClaims
163163

164164
token, _, err := p.ParseUnverified(rawToken, &claims)
165+
if err != nil {
166+
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")
167+
}
165168
return *token, claims, err
166169
}
167170

0 commit comments

Comments
 (0)