Identity

Latest version: v0.9.2

Safety actively analyzes 706567 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.6.0

This release brings lots of improvements to the high level API for Django.

* New feature: Supports Microsoft Entra External ID with custom domain. Please refer to [the configuration](https://identity-library.readthedocs.io/en/latest/django.html#django-configuration) for the details.
* New feature and breaking change: Those Django views decorated by `settings.AUTH.login_required` must accept a keyword parameter `context` now, such as `def index(request, *, context)`. And the signed-in user's information is available in `context["user"]`.
* New feature and breaking change: Django views can now be decorated by `settings.AUTH.login_required(scopes=["your_scope"])` and accept a keyword parameter `context`, such as `def call_web_api(request, *, context)`. The access token will be available in `context["access_token"]`. The old pattern `identity.django.Auth(...).get_token_for_user()` is removed. The token usage is therefore vastly simplified.
* Enhancement: After a successful re-sign-in triggered by `settings.AUTH.login_required`, the user will be brought back to the current page, not the index page.
* Enhancement: The initial sign-in no longer uses scope, thus more likely to succeed. The subsequent token-demanding views will automatically trigger the consent (when necessary); this is also known as "incremental consent".
* Breaking change: `identity.django.Auth(..., scopes=...)` parameter is removed.
* Dropping support for Python 3.7.

**Full Changelog**: https://github.com/rayluo/identity/compare/0.5.2...0.6.0

0.5.2

* Enhancement: The django adapter no longer requires a view named "index" (18)

0.5.1

Bugfix: The logout feature was broken for Microsoft Entra external ID. Now fixed. (17)

0.5.0

* Breaking change: Replace exotic `Auth(..., redirect_view=...)` with ubiquitous `Auth(..., redirect_uri=...)`.
* Enhancement: Add a url name `identity.django.logout` which can be used inside any template via `{% url 'identity.django.logout' %}` to obtain a logout link.

0.4.0

NOTE: Obsolete. Please use 0.5.0+ instead.

This release brings in support for Django by a new API `from identity.django import Auth; AUTH=Auth(...)`. Please see the details in [this sample](https://github.com/Azure-Samples/ms-identity-python-webapp-django).

0.3.3

* Bugfix: Microsoft Entra ID B2C's edit profile feature was broken. Now fixed. Existing web apps (such as [this sample](https://github.com/Azure-Samples/ms-identity-python-webapp)) that were using `identity 0.3.x` series does not need any change other than upgrading Identity to `0.3.3`.

Page 2 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.