Skip to content

Commit

Permalink
fix(op): allow expired id token hints in authorize (#527)
Browse files Browse the repository at this point in the history
Like #522 for end session,
this change allows passing an expired ID token hint to the authorize endpoint.
  • Loading branch information
muhlemmer authored Feb 1, 2024
1 parent 35d9540 commit 045b59e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/op/auth_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,9 +391,9 @@ func ValidateAuthReqIDTokenHint(ctx context.Context, idTokenHint string, verifie
return "", nil
}
claims, err := VerifyIDTokenHint[*oidc.TokenClaims](ctx, idTokenHint, verifier)
if err != nil {
if err != nil && !errors.As(err, &IDTokenHintExpiredError{}) {
return "", oidc.ErrLoginRequired().WithDescription("The id_token_hint is invalid. " +
"If you have any questions, you may contact the administrator of the application.")
"If you have any questions, you may contact the administrator of the application.").WithParent(err)
}
return claims.GetSubject(), nil
}
Expand Down

0 comments on commit 045b59e

Please sign in to comment.