Fix OAuth callback hash redirects
This commit is contained in:
parent
e995ac2764
commit
b6b734dbd1
|
|
@ -40,9 +40,11 @@ def _adobe_redirect_uri() -> str:
|
||||||
|
|
||||||
|
|
||||||
def _sanitize_return_to(value: str | None) -> str:
|
def _sanitize_return_to(value: str | None) -> str:
|
||||||
if value and value.startswith("#/"):
|
if value and value.startswith("/#/"):
|
||||||
return value
|
return value
|
||||||
return "#/templates"
|
if value and value.startswith("#/"):
|
||||||
|
return f"/{value}"
|
||||||
|
return "/#/templates"
|
||||||
|
|
||||||
|
|
||||||
def _build_adobe_authorization_url(state: str) -> str:
|
def _build_adobe_authorization_url(state: str) -> str:
|
||||||
|
|
@ -489,7 +491,7 @@ def docusign_start(request: Request):
|
||||||
state = secrets.token_urlsafe(24)
|
state = secrets.token_urlsafe(24)
|
||||||
session["docusign_oauth_state"] = state
|
session["docusign_oauth_state"] = state
|
||||||
session["docusign_auth_mode"] = "authorization_pending"
|
session["docusign_auth_mode"] = "authorization_pending"
|
||||||
session["docusign_return_to"] = "#/templates"
|
session["docusign_return_to"] = "/#/templates"
|
||||||
authorization_url = build_authorization_url(state=state)
|
authorization_url = build_authorization_url(state=state)
|
||||||
log_event(
|
log_event(
|
||||||
request,
|
request,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue