AzureAD / microsoft-authentication-library-for-js

Microsoft Authentication Library (MSAL) for JS
http://aka.ms/aadv2
MIT License
3.63k stars 2.64k forks source link

Official MSAL react native library request #4735

Open JimmyLS opened 2 years ago

JimmyLS commented 2 years ago

Core Library

MSAL.js v2 (@azure/msal-browser)

Wrapper Library

MSAL React (@azure/msal-react)

Description

Currently we only have this POC library for MSAL react native. As mentioned in that article, this POC library is not intended to use in production.

We also found two compatible libraries in github, the second one was referred in our sample code (Build React Native apps with Microsoft Graph) here.

https://github.com/stashenergy/react-native-msal https://github.com/FormidableLabs/react-native-app-auth

The question is that does Microsoft have plan to provide official MSAL react native library which can be used in production environment? Or the only way is using the compatible libraries when bulding React native apps that authenticates with AAD?

Source

External (Customer)

EmLauber commented 2 years ago

As of right now, the MSAL.js team does not have commitments to turn the POC library into official support. I will track this ask on our backlog for future consideration.

Uzef1997 commented 2 years ago

hello there any updates on the same?

EmLauber commented 2 years ago

No updates, this ask remains uncommitted.

tylerd commented 1 year ago

I am building a React Native app using Azure AD B2C, any updates on this request?

EmLauber commented 1 year ago

No updates but we are tracking interest in React Native.

Uzef1997 commented 1 year ago

I am building a React Native app using Azure AD B2C, any updates on this request?

you can use react-native-app-auth as there is no official updates i am using the same

SabareeshGC commented 1 year ago

Any update, we are holding off our migration to Azure AD B2C because this is not supported yet

EmLauber commented 1 year ago

Still no update on a commitment. Can you tell me more about the B2C scenario you are looking for React Native support with? Is it only for web apps or includes native API usage like React Native running on a mobile platform?

SabareeshGC commented 1 year ago

We have both mobile and web platform as because it is not supported in mobile platform with react native we cannot implement either on the web as user cant login on the mobile device.

Marvedog commented 1 year ago

@EmLauber Not sure where we can submit our interest on this, but I can provide you with a quick write-up of our usage scenarios here. We have two different health apps that use Azure AD B2C. The apps are mobile only and must support OICD-compliant authentication/authorization procedures. For this, we would benefit from a client library that is able to properly handle tokens and the authentication flows using native APIs. We are using a form of react-native-msal, but it has some limitations with regards to token management in an offline scenario on iOS. Furthermore, the base repo is archived so from our perspective there is noe client library that satisfies all our requirements as we have been experiencing issues with react-native-app-auth as well.

crrobinson14 commented 11 months ago

@EmLauber Adding a vote and use case here per your question and agreeing with Marvedog above. When you ask about React Native support for web vs mobile I would imagine 99% of users out there mean mobile when they say "React Native." Although the RN community has recently started branching out to supporting other platforms like Web, those are add-ons. The original purpose and use-case for RN is mobile.

Like Marvedog above, we have a healthcare-industry app we're working on where the backend uses AD B2C for auth. Not having a native library is a barrier for us as well. We've had to ask the client to wrap/black-box the backend auth which both reduces the value of AD in the first place and also the level of security it can provide here. Happy to talk this through more if it's helpful in any way.

PS: Teams has a native mobile app. What are they doing here? They must have an answer for this same problem. If it's not React Native, but purely native (Swift/Kotlin) code, perhaps if that was provided as an SDK it would help another contributor add the RN wrappers around it? Those wrappers are not particularly difficult to create if the core SDK is well documented...

vip-sin commented 9 months ago

@EmLauber any further updates on this, it has been more than a year since this thread has been opened, lot of people have taken the azure subscriptions but are not able to migrate.

Currently, the MSAL (Microsoft Authentication Library) library lacks official support for React Native, preventing developers from seamlessly integrating Azure AD B2C sign-up and sign-in flows into React Native mobile applications. This feature request aims to address the absence of React Native support by enhancing the MSAL library to include dedicated modules or methods for React Native compatibility. Use Case: As a mobile app developer working on a React Native project, I need to implement Azure AD B2C sign-up and sign-in flows for user authentication within my mobile application. The MSAL library is a crucial component for integrating with Azure AD B2C; however, the lack of React Native support is hindering the development process.

Expected Behavior: The MSAL library should provide React Native developers with a set of APIs or modules that allow them to seamlessly integrate Azure AD B2C authentication features into their React Native mobile applications. This includes the ability to initiate sign-up and sign-in flows, handle tokens, and manage user sessions within the React Native context.

React Native has gained widespread adoption for cross-platform mobile app development. Many developers are leveraging Azure AD B2C for identity management in their applications. The lack of React Native support in the MSAL library is a significant barrier.

-- Also the given PoC library was last published over 3 years ago, which can't be of much help.

crrobinson14 commented 9 months ago

We had to fall back to ROPC, which Microsoft specifically recommends against doing but it was our only choice because of the lack of native support.

anishmiviewis commented 6 months ago

any updates on this, as we are also in need of an official library to get our authentication setup?

vip-sin commented 6 months ago

No, from 3 years microsoft is doing PoC, with dedicated SMEs.