···144144145145// ContainsRedirectURI checks if redirectURI is allowed for app
146146func (app *OAuth2Application) ContainsRedirectURI(redirectURI string) bool {
147147+ // OAuth2 requires the redirect URI to be an exact match, no dynamic parts are allowed.
148148+ // https://stackoverflow.com/questions/55524480/should-dynamic-query-parameters-be-present-in-the-redirection-uri-for-an-oauth2
149149+ // https://www.rfc-editor.org/rfc/rfc6819#section-5.2.3.3
150150+ // https://openid.net/specs/openid-connect-core-1_0.html#AuthRequest
151151+ // https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics-12#section-3.1
147152 contains := func(s string) bool {
148153 s = strings.TrimSuffix(strings.ToLower(s), "/")
149154 for _, u := range app.RedirectURIs {