diff --git a/providers/oidc.go b/providers/oidc.go index ccd1bbd..4bc2095 100644 --- a/providers/oidc.go +++ b/providers/oidc.go @@ -123,3 +123,13 @@ func (p *OIDCProvider) createSessionState(token *oauth2.Token, ctx context.Conte Email: claims.Email, }, nil } + +func (p *OIDCProvider) ValidateSessionState(s *SessionState) bool { + ctx := context.Background() + _, err := p.Verifier.Verify(ctx, s.IdToken) + if err != nil { + return false + } + + return true +}