Code Monkey home page Code Monkey logo

Comments (4)

h3rmanj avatar h3rmanj commented on June 20, 2024 2

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.

JonasKs avatar JonasKs commented on June 20, 2024 2

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.

JonasKs avatar JonasKs commented on June 20, 2024 1

@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.

JonasKs avatar JonasKs commented on June 20, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.