Update to quickstart SSO w/ python & MSAL for anyone using FastAPI instead of Flask
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Documentation
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Domaine
- authentication, documentation
Piste de recherche
The issue links to the FastAPI authentication demo repository and the Microsoft Python web app quickstart. Read both to compare the FastAPI example with the Flask quickstart, including its port and callback URL setup. Done means the quickstart offers a clear FastAPI reference for signing in with Microsoft and calling the Graph API.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
New way to use another framework to Add sign-in with Microsoft to a Python web app.
Note: This is a very simple demo - to keep it easy to understand for anyone getting started.
Reason i posted this is that a good friend was having some issues following the getting started with Azure SSO & Flask since the example is in flask only. Thus, I borrowed the flask demo referenced from the quick start guide here. The repo handles redirect to SSO, azure auth, and redirect back to the callback url which eventually gets the JWT(s), and allows you to make calls to the graph api. There are some subtle nuances and conversion is not as easy as one would think, so i wanted to post this in case anyone is looking or a super simple reference repository for doing the same thing from the original guide, but with a really awesome concurrent python library. You get checkout FastAPI here.
The repository demo can be found at https://github.com/AndrewJHart/Azure-FastAPI-Auth-Example
The link to the original guide is below. You will need to follow the guide to get started and create your web app. The only
difference in the setup steps is that the repo i'm sharing runs on port 9000 and the cb url is/oauthinstead of port 5000
and cb beinggetAToken(all of which is configurable). The project layouts are almost identical as well.
This will work in a multi-tenant situation as well. I hope this is helpful. Thanks!
Perhaps it would behoove Azure to use this or a similar example to demonstrate how to do something similar without requiring Flask or Django.
Thanks very much,
- Langage dominant
- Python
- Étoiles
- 971
- Forks
- 223
- Merge moyen
- 13 h 48 min
- PR mergées (30 j)
- 2
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Aucun modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de AzureAD/microsoft-authentication-library-for-python
-
needs attention untriaged
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
AzureSDK bug P1
Difficulté 4/5 3-5 jours Accessibilité débutants 48/100
-
http_client docstring does not say that timeout, verify and proxies only configure the default sessionPeut-être pris @HardMax71 l’a pris il y a 38 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 25/100
-
[Bug] The built-in retry never retries the token POST: HTTPAdapter(max_retries=1) keeps urllib3's default allowed_methodsPeut-être pris @HardMax71 l’a pris il y a 44 jours. Ouvertebug untriaged
Difficulté 2/5 1-3 heures Accessibilité débutants 35/100
AzureAD/microsoft-authentication-library-for-python#957 · 3 commentaires ·
-
public-client untriaged
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
Toutes les issues de AzureAD/microsoft-authentication-library-for-python
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
SwiftKickMobile/skai#84 ·
-
Lychee link check failedOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
jxxghp/MoviePilot#7070 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
flop-labs/technocore-chat#997 ·
Les mainteneurs répondent en général sous 1 jour
-
tunneld on Windows: Wi-Fi devices are not discovered because uvicorn runs on a ProactorEventLoopOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
doronz88/pymobiledevice3#2051 ·
Les mainteneurs répondent en général sous 1 jour