Comments (4)
I don't really have any experience with React Native, and I don't really know if Microsoft's msal
packages are Native friendly. I'm assuming they are not as they probably relies heavily on browser APIs and the DOM, but I might be wrong. If it doesn't work, react-native-msal
might be an alternative? As Jonas said you should still use the Authorization Code Flow with PKCE.
from fastapi-azure-auth.
Seems like there's some specific examples on the PKCE flow on the official website, using this library. An example can be found here (remember to look at the V2 docs).
Good luck! ๐
from fastapi-azure-auth.
@yeguacelestial I believe weโve answered your question as best as we can, so Iโm going to close this issue.
Feel free to re-open if you have any more questions.
from fastapi-azure-auth.
Hi! Thank you for the kind words. ๐
Any flow fetching a token would work. Preferably client side applications should use the Authorization Code (using PKCE) flow. Thatโs the flow the OpenAPI docs also use.
Iโm not a frontend developer so Iโll tag @h3rmanj, he might be able to correct me if the following is wrong:
You can use the Microsoft MSAL react package to handle all token fetching in react. You should set up your app registration in Azure AD just as you did for your OpenAPI docs(with a different redirect URI). This tutorial seem to use the correct flow and libraries.
Quote from the msal-react GitHub README:
This version of the library uses the OAuth 2.0 Authorization Code Flow with PKCE.
from fastapi-azure-auth.
Related Issues (20)
- [Feature request] support Pydantic v2 syntax / @validator -> @field_validator HOT 5
- [BUG/Question] Fixing TypeError during WebSocket Authentication Migration from FastAPI 0.96 to 0.97 HOT 8
- Calling your APIs from Python not working HOT 22
- [Question] Middleware logging does not get request.state.user HOT 2
- Make leeway a setting available for configuration
- [Question] HOT 6
- [BUG/Question] auth_time is parsed as a string, should be int HOT 2
- [BUG/Question] Got 'Token contains invalid claims' error for the `single tenant setup example ` HOT 6
- [Question] Validate bearer token from Angular SPA (Azure AD) in FastAPI HOT 4
- [BUG/Question] Error calling openid_config.load_config with Httpx 0.25.1 HOT 4
- [Bug/Question] HOT 2
- Adding new fields for Client Secret JWT HOT 1
- [Question] Graph API call triggers "admin consent required" HOT 1
- SOLVED: CVE-2024-23342 `ecdsa` may be vulnerable to the Minerva attack HOT 3
- Facing authentication issue mentioning pkce required for cross-origin authorization code redemption HOT 1
- [BUG] got claim `acct` in type `int`, but fastapi-azure-auth is waiting for `str` HOT 1
- Add ability to specify audience and issuer to validate token claims against HOT 1
- [BUG/Question] Example use cases for scopes HOT 6
- [Feature request] Support WebSocket connections. HOT 3
- Empty raise HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fastapi-azure-auth.