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

Question: How to detect authentication operation?

Open
#158 2 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
PowerShell
Stars
324
Forks
145
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.