Azure-Samples / Azure-Samples/ms-identity-python-webapp

Question: How to detect authentication operation?

Aperta
#158 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
PowerShell
Stelle
324
Fork
145
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi

I'm currently transferring existing Flask-app from Flask-Login to use Entra auth with this library. I got the basic auth flow working ok with login_required decorator.

However, I have several checks and operations for new users which have been run so far when user logs in. These create an entry for new user into app's DB and so on. However, now when using login_required, I have not found any way to detect if user has just authorized him/herself against Entra and then run those operations only in that case.

My first idea was to execute the operations when Entra sends used to callback endpoint/redirect URI, but apparently modifying that endpoint is not possible (if I got this right) and it just redirects user back to originally used endpoint.

Before banging my head any further with this, is there any way to detect recent auth/login via the library?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the login_required decorator and the callback/redirect URI behavior described in the issue. Determine whether the library exposes a supported way to identify a recent Entra authorization and run first-login operations; done should be a documented answer or a clearly scoped change request.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
azure, flask, python
Ambito
authentication
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
20/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.