Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Update to quickstart SSO w/ python & MSAL for anyone using FastAPI instead of Flask

Offen
#448 6 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
azure, fastapi, python

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

documentation

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 /oauth instead of port 5000
and cb being getAToken (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,

Vorherrschende Sprache
Python
Sterne
971
Forks
223
Ø Merge
13 Std. 48 Min.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus AzureAD/microsoft-authentication-library-for-python

Alle Issues in AzureAD/microsoft-authentication-library-for-python

Ähnliche Issues

Weitere Issues zu Python

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.