From 66bc0da09b1a5c8f82212ee3109cf93369b8fae8 Mon Sep 17 00:00:00 2001 From: Jaap Heijligers Date: Wed, 23 Feb 2022 12:41:07 +0100 Subject: [PATCH] Use root_path for redirect --- asgi_auth_github/github_auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asgi_auth_github/github_auth.py b/asgi_auth_github/github_auth.py index a77cd90..c30bdfc 100644 --- a/asgi_auth_github/github_auth.py +++ b/asgi_auth_github/github_auth.py @@ -310,7 +310,7 @@ async def auth_callback(self, scope, receive, send): def make_redirect_cookie(self, scope): """cookie to tell browser where to redirect post authentication""" redirect_cookie = SimpleCookie() - redirect_cookie[self.redirect_cookie_name] = scope["path"] + redirect_cookie[self.redirect_cookie_name] = scope["root_path"] + scope["path"] redirect_cookie[self.redirect_cookie_name]["path"] = "/" return redirect_cookie