
Security News
Deno 2.6 + Socket: Supply Chain Defense In Your CLI
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.
identity
Advanced tools
This is an authentication/authorization library, currently optimized for web apps. It provides some higher level APIs built on top of Microsoft's MSAL Python.
This Identity library is an authentication/authorization library that:
DISCLAIMER: The code in this repo is not officially supported by Microsoft and is not intended for production use. The intention of this repo is to unblock customers who would like to use a higher level API, before such an API has been migrated to an Microsoft library with official support. Migration of this API to official support is not guaranteed and is not currently on the MSAL roadmap. Please ensure to fully test any code used from this repository to ensure it works in your environment.
| Microsoft Entra ID | Microsoft Entra External ID | Microsoft Entra External ID with Custom Domain | Azure AD B2C | |
|---|---|---|---|---|
| App Registration |
Following only the step 1, 2 and 3 of this Quickstart: Add sign-in with Microsoft to a Python web app |
Follow only the page 1 of this Tutorial: Prepare your customer tenant ... |
Coming soon. |
Following only the step 1 and 2 (including 2.1 and 2.2) of this Configure authentication in a sample Python web app by using Azure AD B2C |
After app registration, you shall obtain the following information:
| ||||
| Web App Sign In & Sign Out |
By using this library, it will automatically renew signed-in session when the ID token expires.
| |||
| How to customize the login page |
The default login page will typically redirect users to your Identity Provider, so you don't have to customize it. But if the default login page is shown in your browser, you can read its HTML source code, and find the how-to instructions there. | |||
| Web App Calls a web API |
This library supports:
They are demonstrated by the same samples above. | |||
| Web API Calls another web API (On-behalf-of) |
In roadmap. | |||
| How to build the samples above from scratch |
Read our docs here | |||
| Other scenarios |
This package is available on PyPI. Choose the package declaration that matches your web framework:
Note: Make sure you put "identity[...]" in quotes to ensure it works in all terminals.
pip install "identity[django]"pip install "identity[flask]"pip install "identity[quart]"This library follows Semantic Versioning.
Your project should declare identity dependency with proper lower and upper bound.
You can find the changes for each version under Releases.
FAQs
This is an authentication/authorization library, currently optimized for web apps. It provides some higher level APIs built on top of Microsoft's MSAL Python.
We found that identity demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Deno 2.6 introduces deno audit with a new --socket flag that plugs directly into Socket to bring supply chain security checks into the Deno CLI.

Security News
New DoS and source code exposure bugs in React Server Components and Next.js: what’s affected and how to update safely.

Security News
Socket CEO Feross Aboukhadijeh joins Software Engineering Daily to discuss modern software supply chain attacks and rising AI-driven security risks.