Changed the algorithm that generates unique usernames. Previously, in case the
provider did not hand over any information to base the username on, the
username "user" extended with an ever increasing numeric suffix would be
attempted until a free username was found. In case of a large number of
existing users, this could result in many queries being executed before a free
username would be found, potentially resulting in a denial of service. The new
algorithm uses a random suffix and only one query to determine the final
username.
Added a new setting: ACCOUNT_PRESERVE_USERNAME_CASING. This setting
determines whether the username is stored in lowercase (False) or whether
its casing is to be preserved (True). Note that when casing is preserved,
potentially expensive __iexact lookups are performed when filter on
username. For now, the default is set to True to maintain backwards
compatibility.
The OAuth2Adapter class has gained a get_callback_url method for when
customizing the callback URL is desired.
The Battle.net login backend now accepts the region GET parameter.
New providers: 500px, Discord.
Backwards incompatible changes
In previous versions, the DefaultAccountAdapter contained a
username_regex property and accompanying
error_messages['invalid_username'] validation error message. These have
been removed in favor of using the regex validation already defined at the
user model level. Alternatively, you can use the newly introduced
ACCOUNT_USERNAME_VALIDATORS setting.
The Battle.net backend no longer overrides username regex validation. In
order to use battletags as usernames, you are expected to override either
the username field on your User model, or to pass a custom validator
which will accept the `` character using the new ACCOUNT_USERNAME_VALIDATORSsetting. Such a validator is available in socialaccount.providers.battlenet.validators.BattletagUsernameValidator``.
Got merge conflicts? Close this PR and delete the branch. I'll create a new PR for you.
There's a new version of django-allauth available. You are currently using 0.29.0. I have updated it to 0.30.0
These links might come in handy: PyPI | Changelog | Repo
Changelog
Got merge conflicts? Close this PR and delete the branch. I'll create a new PR for you.
Happy merging! 🤖