fix: allow http schema for redirect url for native apps in dev mode (#242)

This commit is contained in:
Utku Özdemir 2022-11-14 16:59:56 +01:00 committed by GitHub
parent 1aa75ec953
commit a314c1483f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,6 +314,9 @@ func validateAuthReqRedirectURINative(client Client, uri string, responseType oi
parsedURL, isLoopback := HTTPLoopbackOrLocalhost(uri) parsedURL, isLoopback := HTTPLoopbackOrLocalhost(uri)
isCustomSchema := !strings.HasPrefix(uri, "http://") isCustomSchema := !strings.HasPrefix(uri, "http://")
if str.Contains(client.RedirectURIs(), uri) { if str.Contains(client.RedirectURIs(), uri) {
if client.DevMode() {
return nil
}
if isLoopback || isCustomSchema { if isLoopback || isCustomSchema {
return nil return nil
} }