minor fix to auth redirect (#1845)

The previous version added and extra "/" to the url after login:
e.g:  https://cellxgene.dev.single-cell.czi.technology/d/pbmc3k.cxg//
This commit is contained in:
bmccandless
2020-09-16 17:37:52 -07:00
committed by GitHub
parent a63bf9d5a3
commit 25c272ae8e

View File

@@ -158,7 +158,7 @@ class AuthTypeOAuth(AuthTypeClientBase):
def login(self):
callbackurl = f"{self.api_base_url}/oauth2/callback"
return_path = request.args.get("dataset", "")
return_to = f"{self.web_base_url}/{return_path}/"
return_to = f"{self.web_base_url}/{return_path}"
# save the return path in the session cookie, accessed in the callback function
session["oauth_callback_redirect"] = return_to
response = self.client.authorize_redirect(redirect_uri=callbackurl)