Search code examples
react-nativeazure-ad-b2creact-native-iosappauth

OAuth2/Azure AD B2C parameters stripped from external web browser in iOS


I've developed an application using React Native for Android. Now that I have a mac I am porting the app for iPhone. iPhone seems to work fine except for authentication.

For authentication I'm using React Native App Auth(RNAppAuth) and Azure AD B2C. I went through and setup RNAppAuth as it says to in the documentation for both AppAuth-IOS and RNAppAuth. I believe that everything is setup right for Azure, because it works flawlessly on my Android app.

So here's the problem... When the app goes to login, it attempts to open the authorization page in another browser. I give it this endpoint (NOTE: I replaced my domain with example just for this)...

https://login.microsoftonline.com/example.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_SigninSignup1

I get this prompt...

enter image description here

When I click Continue it navigates to a generic Microsoft login instead of the one I specify with my policy parameter p=B2C_1_SigninSignup1. In fact, all parameters are stripped it seems, and I'm presented with a login form that does not accept any credentials I have previously setup.

I have found very little about this online, so have come to you guys for help.

Has anyone come across this? If so, how do I fix it?

Thanks in advance.


Solution

  • Not sure of the exact problem here, but you can consult following

    Also please use b2clogin.com. The url you are using is on path of deprecation. Read here for more info