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