Coder Social home page Coder Social logo

Comments (17)

Monisankarnath avatar Monisankarnath commented on June 26, 2024 2

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.

vmurin avatar vmurin commented on June 26, 2024 1

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.

tgmcguire avatar tgmcguire commented on June 26, 2024

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

vmurin avatar vmurin commented on June 26, 2024

Glad to help you out!

from react-native-azure-auth.

Headcult avatar Headcult commented on June 26, 2024

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

vmurin avatar vmurin commented on June 26, 2024

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

Headcult avatar Headcult commented on June 26, 2024

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

Headcult avatar Headcult commented on June 26, 2024

@vmurin Any more pointers on this please?

from react-native-azure-auth.

vmurin avatar vmurin commented on June 26, 2024

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.

MirzaArslan123 avatar MirzaArslan123 commented on June 26, 2024

HI Vmurin
i also face the same issue for some days can you please guide me

i am facing this issue in android emulator

Screenshot 2023-06-02 at 10 41 52 AM
Screenshot 2023-06-02 at 10 43 17 AM
Screenshot 2023-06-02 at 10 43 54 AM
Screenshot 2023-06-02 at 10 44 46 AM

but

from react-native-azure-auth.

MirzaArslan123 avatar MirzaArslan123 commented on June 26, 2024

@vmurin i am really thankful to you if you respond me fastly

from react-native-azure-auth.

vmurin avatar vmurin commented on June 26, 2024

@vmurin i am really thankful to you if you respond me fastly

See this reply please: #181 (comment)

from react-native-azure-auth.

MirzaArslan123 avatar MirzaArslan123 commented on June 26, 2024

@vmurin yes i am also try this solution but the error is same

from react-native-azure-auth.

MirzaArslan123 avatar MirzaArslan123 commented on June 26, 2024

Screenshot 2023-06-05 at 8 06 50 PM
Screenshot 2023-06-05 at 8 07 34 PM

from react-native-azure-auth.

MirzaArslan123 avatar MirzaArslan123 commented on June 26, 2024

Screenshot 2023-06-05 at 8 08 00 PM
Screenshot 2023-06-05 at 8 08 23 PM

from react-native-azure-auth.

MirzaArslan123 avatar MirzaArslan123 commented on June 26, 2024

@vmurin error is same
Screenshot 2023-06-05 at 8 09 09 PM

from react-native-azure-auth.

iamsaadMehmood avatar iamsaadMehmood commented on June 26, 2024

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)

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.