diff --git a/api/controllers/console/auth/oauth.py b/api/controllers/console/auth/oauth.py index 28ff69a0b4c8de..10308943fd41c8 100644 --- a/api/controllers/console/auth/oauth.py +++ b/api/controllers/console/auth/oauth.py @@ -42,7 +42,8 @@ def get_oauth_providers(): class OAuthLogin(Resource): - def get(self, provider: str, invite_toke: Optional[str] = None): + def get(self, provider: str): + invite_token = request.args.get("invite_token") or None OAUTH_PROVIDERS = get_oauth_providers() with current_app.app_context(): oauth_provider = OAUTH_PROVIDERS.get(provider) @@ -50,7 +51,7 @@ def get(self, provider: str, invite_toke: Optional[str] = None): if not oauth_provider: return {"error": "Invalid provider"}, 400 - auth_url = oauth_provider.get_authorization_url(invite_toke) + auth_url = oauth_provider.get_authorization_url(invite_token=invite_token) return redirect(auth_url)