devilry / devilry-django

Devilry project main repository
http://devilry.org
BSD 3-Clause "New" or "Revised" License
51 stars 24 forks source link

Support for django-allauth >= 0.62 #1300

Closed espenak closed 2 months ago

espenak commented 3 months ago

There seems to be a rename of allauth.socialaccount.providers.dataporten.views.DataportenAdapter in django-allauth 0.62. We probably just need to rename it in devilry/devilry_dataporten_allauth/views.py.

espenak commented 3 months ago

Somewhat related to #1299

espenak commented 3 months ago

Froze the required version to 0.61.x in 1d942cc0eda3f2f48159e246d58c3e29255e3753 until we fix this.

Levijatan commented 3 months ago

Was a rename, "DataportenAdapter" to "DataportenOAuth2Adapter". Also added the [socialaccount] extra according to https://allauth.org/news/2024/04/django-allauth-0.62.0-released/. Fix is in d6feb68

Levijatan commented 3 months ago

Also had to add the setting ACCOUNT_USER_MODEL_EMAIL_FIELD = ''. Since allauth now only stores emails in lower case and we store emails in an UserEmail model, I had to set this setting to '' to be able to run the migrations from allauth. Commited in deb8603.

espenak commented 2 months ago

Also moving this to 6.3 since the general dependency updates forces this update.

torgeirl commented 2 months ago

Authentication for Devilry 6.3.2 with django-allauth[socialaccount]==0.62.* fails due to an error on line 39 in devilry_dataporten_allauth/callback.py:

AttributeError: 'DevilryOAuth2CallbackView' object has no attribute 'get_client'
  File "django/core/handlers/base.py", line 197, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "allauth/socialaccount/providers/oauth2/views.py", line 102, in view
    return self.dispatch(request, *args, **kwargs)
  File "devilry/devilry_dataporten_allauth/callback.py", line 39, in dispatch
    client = self.get_client(request, app)

Perhaps the changes in f6059d4 wasn't correct?

torgeirl commented 2 months ago

Solved in v6.3.3. :+1: