-
Notifications
You must be signed in to change notification settings - Fork 332
Newer version of dj-rest-auth causes OAuth2Client.__init__() got multiple values for argument 'scope_delimiter'
error.
#673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I get the same error.
|
I hotfixed this by writing custom client from allauth.socialaccount.providers.apple.client import AppleOAuth2Client
class CustomAppleOAuth2Client(AppleOAuth2Client):
def __init__(
self,
request,
consumer_key,
consumer_secret,
access_token_method,
access_token_url,
callback_url,
_scope, # This is fix for incompatibility between django-allauth==65.3.1 and dj-rest-auth==7.0.1
scope_delimiter=" ",
headers=None,
basic_auth=False,
):
super().__init__(
request,
consumer_key,
consumer_secret,
access_token_method,
access_token_url,
callback_url,
scope_delimiter,
headers,
basic_auth,
) and using it in view class AppleLogin(SocialLoginView):
...
client_class = CustomAppleOAuth2Client (not sure if this fixes everything, but it fixes |
Thanks 🙏🏽 This seems to work from initial testing. |
in case someone is interested for gogole auth this would look as follows:
|
Hello,
I was setting up a new project with dj-rest-auth and for some reason I was running into
JSONDecodeError at /auth/google/callback/
. I set it up identically to a previous project but was still getting this error. When I changed my requirements.txt file fromto
everything started working again.
The JSONDecodeError is because the call to the google_login view is resulting in a Django error page in the form of HTML, not JSON. Looking into the HTML that the google_login view is responding with I was able to see that the root cause is
TypeError
OAuth2Client.__init__() got multiple values for argument 'scope_delimiter'
, which is clearly not something that is affected by my implementation.Please share the correct version numbers to use and also where the documentation may be adjusted to address this. Please let me know if you'd like any additional details, thanks!
The text was updated successfully, but these errors were encountered: