Skip to content
Snippets Groups Projects
Commit aa015609 authored by Xiao Gui's avatar Xiao Gui
Browse files

fix: login redirect

parent 802b497c
No related branches found
No related tags found
No related merge requests found
......@@ -43,7 +43,8 @@ async def login_via_ebrains(request: Request, state: str = None):
kwargs = {}
if state:
kwargs["state"] = state
redirect_uri = str(request.base_url).rstrip("/") + HOST_PATHNAME + "/hbp-oidc-v2/cb"
base_url = str(request.base_url).replace("http://", "https://", 1)
redirect_uri = base_url.rstrip("/") + HOST_PATHNAME + "/hbp-oidc-v2/cb"
return await oauth.ebrains.authorize_redirect(request, redirect_uri=redirect_uri, **kwargs)
@router.get("/hbp-oidc-v2/cb")
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment