Comments (17)
Guys I found the solution and it is working with the current version 1.8.9 - Soln
@vmurin I think azure b2c ad updated somethings when we try to give the package name and bundle_id, it doesnot take anything else appending that like /callback. Can we update the docs ?
from react-native-azure-auth.
Hi Tommy,
I suppose the problem is in call-back-URL: either it is not defined or it is not reachable (the second one is more probable) - so after you are authenticated on MS login page, you should be redirected to call-back and if it not reachable you will see endlessly loading indicator.
For some web-app the call-back-URL is a real URL with http(s):// scheme. For an RN-app it is custom URL with some custom scheme. If you followed the README the scheme is you BUNDLE_ID (on android). And you must register the scheme in your app (see README for your OS). If the scheme is not registered it could probably also lead to an endless lasting call.
Hope it will help you :)
from react-native-azure-auth.
@vmurin Thanks for the speedy response! This is spot on. I had copied the wrong ID over, which obviously caused issues – I didn't even think to look there. Thanks so much!
from react-native-azure-auth.
Glad to help you out!
from react-native-azure-auth.
@vmurin I'm stuck with the same issue for many days now. I've used the same Bundle Identifier (mentioned in Xcode) in the Callback URL in Azure Portal. Still, I see the endless loading screen. It works fine for Android though as it's the Package Name we give over there.
iOS
{YOUR_BUNDLE_IDENTIFIER}://${YOUR_BUNDLE_IDENTIFIER}/ios/callback
Android
{YOUR_APP_PACKAGE_NAME}://{YOUR_APP_PACKAGE_NAME}/android/callback
Can you please help me here?
from react-native-azure-auth.
@Headcult
Hi, actually it is possible to have the same callback URLs for both systems. But in your case (if Android works) it should be the easy reason - you have to maintain two (both iOS and Android) URLs in Azure App Registration.
Did you have enter the iOS URL into Azure?
Have a nice day!
from react-native-azure-auth.
@vmurin Thanks for the response. Still not able to figure out the right IDs to use in info.plist and the redirect URLs in Azure.
In my info.plist, here's my Bundle Identifier: org.reactjs.native.example.xxxxx and the same is in my URL schemes as well as seen below:
<key>CFBundleIdentifier</key>
<string>org.reactjs.native.example.xxxxx</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>CFBundleURLName</key>
<string>auth0</string>
<key>CFBundleURLSchemes</key>
<array>
<string>org.reactjs.native.example.xxxxx</string>
</array>
</dict>
</array>
And in my Azure Redirect URLs, there are two entries for Android and iOS as seen below:
- org.reactjs.native.example.xxxxx://org.reactjs.native.example.xxxxx/ios/callback
- com.xxxxx://com.xxxxx/android/callback
This is as per the Readme for iOS and Android. But still it loads endlessly for iOS and works fine for Android.
@vmurin @tgmcguire, Any inputs on how to resolve this? Thanks in advance!
from react-native-azure-auth.
@vmurin Any more pointers on this please?
from react-native-azure-auth.
Point number one:
Take a look at the RN docs https://facebook.github.io/react-native/docs/linking.html
apparently you have to adjust linking code to make it work, depending on iOS version and linking type. I mean the section in README related to AppDelegate.[swift|m]
Point number two:
It could be some weird inconsistency in bundle naming - you better should not use hard-coded strings but variables and just set bundle ID in XCode once.
Example portion for your plist
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Headcult App $(BUNDLE_NAME_SUFFIX)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.3.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>None</string>
<key>CFBundleURLName</key>
<string>Headcult App</string>
<key>CFBundleURLSchemes</key>
<array>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
</array>
</dict>
</array>
Additional clue:
https://stackoverflow.com/questions/32862253/xcode-7-changing-product-bundle-identifier
from react-native-azure-auth.
HI Vmurin
i also face the same issue for some days can you please guide me
i am facing this issue in android emulator
but
from react-native-azure-auth.
@vmurin i am really thankful to you if you respond me fastly
from react-native-azure-auth.
@vmurin i am really thankful to you if you respond me fastly
See this reply please: #181 (comment)
from react-native-azure-auth.
@vmurin yes i am also try this solution but the error is same
from react-native-azure-auth.
from react-native-azure-auth.
from react-native-azure-auth.
@vmurin error is same
from react-native-azure-auth.
remove android:pathPrefix
from intent-filter
and update your intent filter to the following it will fix your issue
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host='${applicationid}'
android:scheme="msauth" />
</intent-filter>
from react-native-azure-auth.
Related Issues (20)
- Authentication IOS: Network request failed with face ID (IOS)
- ClearSession WebView iOS error when closing HOT 2
- Azure MFA Network Failure on iOS HOT 3
- Logout Redirect issue HOT 5
- First login attempt always fails HOT 3
- Expo Support HOT 1
- Logout WebView Not Closing HOT 3
- AcquireTokenSilent not working HOT 1
- [iOS] - Popup name edit HOT 2
- AcquireTokenSilent error - [TypeError: Cannot read property 'accessToken' of null] HOT 8
- i cant able to sign out from azuare ad. am usseing this in react native web
- Hide the address bar HOT 4
- Not able to change the authorityUrl/issuer using the authorize method HOT 11
- Data dog Rum is supported react native web ? HOT 1
- ClearSession is showing prompt to Sign In when user wants to Logout in iOS HOT 8
- Login screen is blank
- Is it possible to obtain the accessToken in JWT format? HOT 1
- Account login in app with lib not show MFA, but login with safari have MFA
- android stuck on "continue", does nothing HOT 2
- I using redirect_uri = myapp://app when login auto bypass not show MFA
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 react-native-azure-auth.