From b0c82ce09fb09b9603bc7fc4efbf8f8ea0bcb578 Mon Sep 17 00:00:00 2001 From: Georg Krause Date: Mon, 7 Nov 2022 20:19:07 +0100 Subject: [PATCH] fix(oauth): Fix too many arguments error by removing not used token --- api/funkwhale_api/users/oauth/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/funkwhale_api/users/oauth/views.py b/api/funkwhale_api/users/oauth/views.py index d4d640650..f64566d32 100644 --- a/api/funkwhale_api/users/oauth/views.py +++ b/api/funkwhale_api/users/oauth/views.py @@ -188,7 +188,7 @@ class AuthorizeView(views.APIView, oauth_views.AuthorizationView): except models.Application.DoesNotExist: return self.json_payload({"non_field_errors": ["Invalid application"]}, 400) - def redirect(self, redirect_to, application, token=None): + def redirect(self, redirect_to, application): if self.request.is_ajax(): # Web client need this to be able to redirect the user query = urllib.parse.urlparse(redirect_to).query @@ -197,7 +197,7 @@ class AuthorizeView(views.APIView, oauth_views.AuthorizationView): {"redirect_uri": redirect_to, "code": code}, status_code=200 ) - return super().redirect(redirect_to, application, token) + return super().redirect(redirect_to, application) def error_response(self, error, application): if isinstance(error, oauth2_exceptions.FatalClientError):