allow any redirect_uri if the app isn't approved
This commit is contained in:
parent
03976ea1c2
commit
085dec069b
|
@ -78,8 +78,9 @@ def authorize():
|
|||
|
||||
# check if redirect_uri is valid
|
||||
# allow localhost by default
|
||||
# allow any redirect_uri if the app isn't approved
|
||||
hostname, scheme = get_host_name_and_scheme(redirect_uri)
|
||||
if hostname != "localhost" and hostname != "127.0.0.1":
|
||||
if hostname != "localhost" and hostname != "127.0.0.1" and client.approved:
|
||||
# support custom scheme for mobile app
|
||||
if scheme == "http":
|
||||
final_redirect_uri = f"{redirect_uri}?error=http_not_allowed"
|
||||
|
|
Loading…
Reference in New Issue