Closed madsruben closed 2 weeks ago
Your direction is correct, initiate_auth_code_flow()
and acquire_token_by_auth_code_flow()
are the way to go, IF you are going to build the auth-for-web directly on top of MSAL. Just keep in mind that MSAL is a lower-than-web-level library, so, you will have lots of web-specific issues to take care of. If you are not aware of, we have a Flask web app sample and a Django web app sample. They are not built for FastAPI, I know, but you can probably draw some inspiration from their implementation on how they (do not need to) handle those issues, via the help of their dependency, a mid-tier library optimized for web and built on top of MSAL.
Hello. First of all, thank you for supporting developers in integrating with the Microsoft ecosystem.
We're looking to validate some assumptions on how to use msal.
We have an SPA with FastAPI as the backend, and would like to offer M365 users to log in to the platform using their existing credentials. There are a lot of code examples around, but we weren't really able to find a clear guide on how you are supposed to use the library.
We want to use OpenID Connect to get user information from the Identity Provider (Entra) for their first-time registration and later sign-in.
Our understanding is that using the Implicit Grant Flow to retrieve ID Tokens has been deprecated, and as our FastAPI backend represents a
ConfidentialClient
, we are using the Authorization Code Flow.At this point, we're waiting for the user to come back, to the following endpoint:
Would you be able to please confirm whether our assumptions are correct and that this is the intended way to use the library?
Thank you.