| 1 |
0.59.0 (2023-12-13) |
| 2 |
******************* |
| 3 |
|
| 4 |
Noteworthy changes |
| 5 |
------------------- |
| 6 |
|
| 7 |
- The MFA authenticator model now features "created at" an "last used "at" |
| 8 |
timestamps. |
| 9 |
|
| 10 |
- The MFA authenticator model is now registered with the Django admin. |
| 11 |
|
| 12 |
- Added MFA signals emitted when authenticators are added, removed or (in case |
| 13 |
of recovery codes) reset. |
| 14 |
|
| 15 |
- There is now an MFA adapter method ``can_delete_authenticator(authenticator)`` |
| 16 |
available that can be used to prevent users from deactivating e.g. their TOTP |
| 17 |
authenticator. |
| 18 |
|
| 19 |
- Added a new app, user sessions, allowing users to view a list of all their |
| 20 |
active sessions, as well as offering a means to end these sessions. |
| 21 |
|
| 22 |
- A configurable timeout (``SOCIALACCOUNT_REQUESTS_TIMEOUT``) is now applied to |
| 23 |
all upstream requests. |
| 24 |
|
| 25 |
- Added a setting ``ACCOUNT_EMAIL_UNKNOWN_ACCOUNTS`` to disable sending of |
| 26 |
emails to unknown accounts. |
| 27 |
|
| 28 |
- You can now override the MFA forms via the ``MFA_FORMS`` setting. |
| 29 |
|
| 30 |
|
| 31 |
Backwards incompatible changes |
| 32 |
------------------------------ |
| 33 |
|
| 34 |
- The account adapter method ``should_send_confirmation_mail()`` signature |
| 35 |
changed. It now takes an extra ``signup`` (boolean) parameter. |
| 36 |
|
| 37 |
- Removed OAuth 1.0 based Bitbucket provider and LinkedIn provider. |
| 38 |
|
| 39 |
|
| 40 |
0.58.2 (2023-11-06) |
| 41 |
******************* |
| 42 |
|
| 43 |
Fixes |
| 44 |
----- |
| 45 |
|
| 46 |
- Added rate limiting to the MFA login form. |
| 47 |
|
| 48 |
|
| 49 |
0.58.1 (2023-10-29) |
| 50 |
******************* |
| 51 |
|
| 52 |
Fixes |
| 53 |
----- |
| 54 |
|
| 55 |
- Fixed missing ``{% load allauth %}`` in the login cancelled and verified email |
| 56 |
required template. |
| 57 |
|
| 58 |
|
| 59 |
0.58.0 (2023-10-26) |
| 60 |
******************* |
| 61 |
|
| 62 |
Noteworthy changes |
| 63 |
------------------- |
| 64 |
|
| 65 |
- The ``SocialAccount.extra_data`` field was a custom JSON field that used |
| 66 |
``TextField`` as the underlying implementation. It was once needed because |
| 67 |
Django had no ``JSONField`` support. Now, this field is changed to use the |
| 68 |
official ``JSONField()``. Migrations are in place. |
| 69 |
|
| 70 |
- Officially support Django 5.0. |
| 71 |
|
| 72 |
- In previous versions, users could never remove their primary email address. |
| 73 |
This is constraint is now relaxed. In case the email address is not required, |
| 74 |
for example, because the user logs in by username, removal of the email |
| 75 |
address is allowed. |
| 76 |
|
| 77 |
- Added a new setting ``ACCOUNT_REAUTHENTICATION_REQUIRED`` that, when enabled, |
| 78 |
requires the user to reauthenticate before changes (such as changing the |
| 79 |
primary email address, adding a new email address, etc.) can be performed. |
| 80 |
|
| 81 |
|
| 82 |
Backwards incompatible changes |
| 83 |
------------------------------ |
| 84 |
|
| 85 |
- Refactored the built-in templates, with the goal of being able to adjust the |
| 86 |
look and feel of the whole project by only overriding a few core templates. |
| 87 |
This approach allows you to achieve visual results fast, but is of course more |
| 88 |
limited compared to styling all templates yourself. If your project provided |
| 89 |
its own templates then this change will not affect anything, but if you rely |
| 90 |
on (some of) the built-in templates your project may be affected. |
| 91 |
|
| 92 |
- The Azure provider has been removed in favor of keeping the Microsoft |
| 93 |
provider. Both providers were targeting the same goal. |
| 94 |
|
| 95 |
|
| 96 |
Security notice |
| 97 |
--------------- |
| 98 |
|
| 99 |
- Facebook: Using the JS SDK flow, it was possible to post valid access tokens |
| 100 |
originating from other apps. Facebook user IDs are scoped per app. By default |
| 101 |
that user ID (not the email address) is used as key while |
| 102 |
authenticating. Therefore, such access tokens can not be abused by |
| 103 |
default. However, in case ``SOCIALACCOUNT_EMAIL_AUTHENTICATION`` was |
| 104 |
explicitly enabled for the Facebook provider, these tokens could be used to |
| 105 |
login. |
| 106 |
|
| 107 |
|
| 108 |
0.57.0 (2023-09-24) |
| 109 |
******************* |
| 110 |
|
| 111 |
Noteworthy changes |
| 112 |
------------------- |
| 113 |
|
| 114 |
- Added Django password validation help text to ``password1`` on |
| 115 |
set/change/signup forms. |
| 116 |
|
| 117 |
- Microsoft: the tenant parameter can now be configured per app. |
| 118 |
|
| 119 |
- SAML: Added support for additional configuration parameters, such as contacts, |
| 120 |
and support for certificate rotation. |
| 121 |
|
| 122 |
- The enumeration prevention behavior at signup is now configurable. Whether or |
| 123 |
not enumeration can be prevented during signup depends on the email |
| 124 |
verification method. In case of mandatory verification, enumeration can be |
| 125 |
properly prevented because the case where an email address is already taken is |
| 126 |
indistinguishable from the case where it is not. However, in case of optional |
| 127 |
or disabled email verification, enumeration can only be prevented by allowing |
| 128 |
the signup to go through, resulting in multiple accounts sharing same email |
| 129 |
address (although only one of the accounts can ever have it verified). When |
| 130 |
enumeration is set to ``True``, email address uniqueness takes precedence over |
| 131 |
enumeration prevention, and the issue of multiple accounts having the same |
| 132 |
email address will be avoided, thus leaking information. Set it to |
| 133 |
``"strict"`` to allow for signups to go through. |
| 134 |
|
| 135 |
|
| 136 |
Fixes |
| 137 |
===== |
| 138 |
|
| 139 |
- Fixed ``?next=`` URL handling in the SAML provider. |
| 140 |
|
| 141 |
- During 2FA, pending logins were incorrectly removed when e.g. Django was asked |
| 142 |
to serve a ``/favicon.ico`` URL. |
| 143 |
|
| 144 |
|
| 145 |
0.56.1 (2023-09-08) |
| 146 |
******************* |
| 147 |
|
| 148 |
Security notice |
| 149 |
--------------- |
| 150 |
|
| 151 |
- ``ImmediateHttpResponse`` exceptions were not handled properly when raised |
| 152 |
inside ``adapter.pre_login()``. If you relied on aborting the login using |
| 153 |
this mechanism, that would not work. Most notably, django-allauth-2fa uses |
| 154 |
this approach, resulting in 2FA not being triggered. |
| 155 |
|
| 156 |
|
| 157 |
0.56.0 (2023-09-07) |
| 158 |
******************* |
| 159 |
|
| 160 |
Noteworthy changes |
| 161 |
------------------- |
| 162 |
|
| 163 |
- Added builtin support for Two-Factor Authentication via the ``allauth.mfa`` app. |
| 164 |
|
| 165 |
- The fact that ``request`` is not available globally has left its mark on the |
| 166 |
code over the years. Some functions get explicitly passed a request, some do |
| 167 |
not, and some constructs have it available both as a parameter and as |
| 168 |
``self.request``. As having request available is essential, especially when |
| 169 |
trying to implement adapter hooks, the request has now been made globally |
| 170 |
available via:: |
| 171 |
|
| 172 |
from allauth.core import context |
| 173 |
context.request |
| 174 |
|
| 175 |
- Previously, ``SOCIALACCOUNT_STORE_TOKENS = True`` did not work when the social |
| 176 |
app was configured in the settings instead of in the database. Now, this |
| 177 |
functionality works regardless of how you configure the app. |
| 178 |
|
| 179 |
|
| 180 |
Backwards incompatible changes |
| 181 |
------------------------------ |
| 182 |
|
| 183 |
- Dropped support for Django 3.1. |
| 184 |
|
| 185 |
- The ``"allauth.account.middleware.AccountMiddleware"`` middleware is required |
| 186 |
to be present in your ``settings.MIDDLEWARE``. |
| 187 |
|
| 188 |
- Starting from September 1st 2023, CERN upgraded their SSO to a standard OpenID |
| 189 |
Connect based solution. As a result, the previously builtin CERN provider is |
| 190 |
no longer needed and has been removed. Instead, use the regular OpenID Connect |
| 191 |
configuration:: |
| 192 |
|
| 193 |
SOCIALACCOUNT_PROVIDERS = { |
| 194 |
"openid_connect": { |
| 195 |
"APPS": [ |
| 196 |
{ |
| 197 |
"provider_id": "cern", |
| 198 |
"name": "CERN", |
| 199 |
"client_id": "<insert-id>", |
| 200 |
"secret": "<insert-secret>", |
| 201 |
"settings": { |
| 202 |
"server_url": "https://auth.cern.ch/auth/realms/cern/.well-known/openid-configuration", |
| 203 |
}, |
| 204 |
} |
| 205 |
] |
| 206 |
} |
| 207 |
} |
| 208 |
|
| 209 |
- The Keycloak provider was added before the OpenID Connect functionality |
| 210 |
landed. Afterwards, the Keycloak implementation was refactored to reuse the |
| 211 |
regular OIDC provider. As this approach led to bugs (see 0.55.1), it was |
| 212 |
decided to remove the Keycloak implementation altogether. Instead, use the |
| 213 |
regular OpenID Connect configuration:: |
| 214 |
|
| 215 |
SOCIALACCOUNT_PROVIDERS = { |
| 216 |
"openid_connect": { |
| 217 |
"APPS": [ |
| 218 |
{ |
| 219 |
"provider_id": "keycloak", |
| 220 |
"name": "Keycloak", |
| 221 |
"client_id": "<insert-id>", |
| 222 |
"secret": "<insert-secret>", |
| 223 |
"settings": { |
| 224 |
"server_url": "http://keycloak:8080/realms/master/.well-known/openid-configuration", |
| 225 |
}, |
| 226 |
} |
| 227 |
] |
| 228 |
} |
| 229 |
} |
| 230 |
|
| 231 |
|
| 232 |
0.55.2 (2023-08-30) |
| 233 |
******************* |
| 234 |
|
| 235 |
Fixes |
| 236 |
----- |
| 237 |
|
| 238 |
- Email confirmation: An attribute error could occur when following invalid |
| 239 |
email confirmation links. |
| 240 |
|
| 241 |
|
| 242 |
0.55.1 (2023-08-30) |
| 243 |
******************* |
| 244 |
|
| 245 |
Fixes |
| 246 |
----- |
| 247 |
|
| 248 |
- SAML: the lookup of the app (``SocialApp``) was working correctly for apps |
| 249 |
configured via the settings, but failed when the app was configured via the |
| 250 |
Django admin. |
| 251 |
|
| 252 |
- Keycloak: fixed reversal of the callback URL, which was reversed using |
| 253 |
``"openid_connect_callback"`` instead of ``"keycloak_callback"``. Although the |
| 254 |
resulting URL is the same, it results in a ``NoReverseMatch`` error when |
| 255 |
``allauth.socialaccount.providers.openid_connect`` is not present in |
| 256 |
``INSTALLED_APPS``. |
| 257 |
|
| 258 |
|
| 259 |
0.55.0 (2023-08-22) |
| 260 |
******************* |
| 261 |
|
| 262 |
Noteworthy changes |
| 263 |
------------------- |
| 264 |
|
| 265 |
- Introduced a new setting ``ACCOUNT_PASSWORD_RESET_TOKEN_GENERATOR`` that |
| 266 |
allows you to specify the token generator for password resets. |
| 267 |
|
| 268 |
- Dropped support for Django 2.x and 3.0. |
| 269 |
|
| 270 |
- Officially support Django 4.2. |
| 271 |
|
| 272 |
- New providers: Miro, Questrade |
| 273 |
|
| 274 |
- It is now possible to manage OpenID Connect providers via the Django |
| 275 |
admin. Simply add a `SocialApp` for each OpenID Connect provider. |
| 276 |
|
| 277 |
- There is now a new flow for changing the email address. When enabled |
| 278 |
(``ACCOUNT_CHANGE_EMAIL``), users are limited to having exactly one email |
| 279 |
address that they can change by adding a temporary second email address that, |
| 280 |
when verified, replaces the current email address. |
| 281 |
|
| 282 |
- Changed spelling from "e-mail" to "email". Both are correct, however, the |
| 283 |
trend over the years has been towards the simpler and more streamlined form |
| 284 |
"email". |
| 285 |
|
| 286 |
- Added support for SAML 2.0. Thanks to `Dskrpt <https://dskrpt.de>`_ |
| 287 |
for sponsoring the development of this feature! |
| 288 |
|
| 289 |
- Fixed Twitter OAuth2 authentication by using basic auth and adding scope `tweet.read`. |
| 290 |
|
| 291 |
- Added (optional) support for authentication by email for social logins (see |
| 292 |
``SOCIALACCOUNT_EMAIL_AUTHENTICATION``). |
| 293 |
|
| 294 |
|
| 295 |
Security notice |
| 296 |
--------------- |
| 297 |
|
| 298 |
- Even with account enumeration prevention in place, it was possible for a user |
| 299 |
to infer whether or not a given account exists based by trying to add |
| 300 |
secondary email addresses . This has been fixed -- see the note on backwards |
| 301 |
incompatible changes. |
| 302 |
|
| 303 |
|
| 304 |
Backwards incompatible changes |
| 305 |
------------------------------ |
| 306 |
|
| 307 |
- Data model changes: when ``ACCOUNT_UNIQUE_EMAIL=True`` (the default), there |
| 308 |
was a unique constraint on set on the ``email`` field of the ``EmailAddress`` |
| 309 |
model. This constraint has been relaxed, now there is a unique constraint on |
| 310 |
the combination of ``email`` and ``verified=True``. Migrations are in place to |
| 311 |
automatically transition, but if you have a lot of accounts, you may need to |
| 312 |
take special care using ``CREATE INDEX CONCURRENTLY``. |
| 313 |
|
| 314 |
- The method ``allauth.utils.email_address_exists()`` has been removed. |
| 315 |
|
| 316 |
- The Mozilla Persona provider has been removed. The project was shut down on |
| 317 |
November 30th 2016. |
| 318 |
|
| 319 |
- A large internal refactor has been performed to be able to add support for |
| 320 |
providers oferring one or more subproviders. This refactor has the following |
| 321 |
impact: |
| 322 |
|
| 323 |
- The provider registry methods ``get_list()``, ``by_id()`` have been |
| 324 |
removed. The registry now only providers access to the provider classes, not |
| 325 |
the instances. |
| 326 |
|
| 327 |
- ``provider.get_app()`` has been removed -- use ``provider.app`` instead. |
| 328 |
|
| 329 |
- ``SocialApp.objects.get_current()`` has been removed. |
| 330 |
|
| 331 |
- The ``SocialApp`` model now has additional fields ``provider_id``, and |
| 332 |
``settings``. |
| 333 |
|
| 334 |
- The OpenID Connect provider ``SOCIALACCOUNT_PROVIDERS`` settings structure |
| 335 |
changed. Instead of the OpenID Connect specific ``SERVERS`` construct, it |
| 336 |
now uses the regular ``APPS`` approach. Please refer to the OpenID Connect |
| 337 |
provider documentation for details. |
| 338 |
|
| 339 |
- The Telegram provider settings structure, it now requires to app. Please |
| 340 |
refer to the Telegram provider documentation for details. |
| 341 |
|
| 342 |
- The Facebook provider loaded the Facebook connect ``sdk.js`` regardless of the |
| 343 |
value of the ``METHOD`` setting. To prevent tracking, now it only loads the |
| 344 |
Javascript if ``METHOD`` is explicitly set to ``"js_sdk"``. |
| 345 |
|
| 346 |
|
| 347 |
|
| 348 |
0.54.0 (2023-03-31) |
| 349 |
******************* |
| 350 |
|
| 351 |
Noteworthy changes |
| 352 |
------------------- |
| 353 |
|
| 354 |
- Dropped support for EOL Python versions (3.5, 3.6). |
| 355 |
|
| 356 |
|
| 357 |
Security notice |
| 358 |
--------------- |
| 359 |
|
| 360 |
- Even when account enumeration prevention was turned on, it was possible for an |
| 361 |
attacker to infer whether or not a given account exists based upon the |
| 362 |
response time of an authentication attempt. Fixed. |
| 363 |
|
| 364 |
|
| 365 |
0.53.1 (2023-03-20) |
| 366 |
******************* |
| 367 |
|
| 368 |
Noteworthy changes |
| 369 |
------------------- |
| 370 |
|
| 371 |
- Example base template was missing ``{% load i18n %}``, fixed. |
| 372 |
|
| 373 |
|
| 374 |
0.53.0 (2023-03-16) |
| 375 |
******************* |
| 376 |
|
| 377 |
Noteworthy changes |
| 378 |
------------------- |
| 379 |
|
| 380 |
- You can now override the use of the ``UserTokenForm`` over at the |
| 381 |
``PasswordResetFromKeyView`` by configuring ``ACCOUNT_FORMS["user_token"]`` to |
| 382 |
allow the change of the password reset token generator. |
| 383 |
|
| 384 |
- The Google API URLs are now configurable via the provider setting which |
| 385 |
enables use-cases such as overriding the endpoint during integration tests to |
| 386 |
talk to a mocked version of the API. |