Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft login screen loads endlessly #6

Closed
tgmcguire opened this issue Oct 18, 2018 · 17 comments
Closed

Microsoft login screen loads endlessly #6

tgmcguire opened this issue Oct 18, 2018 · 17 comments
Labels

Comments

@tgmcguire
Copy link

Hey there!

I'm having an issue with signing in. I've got the package installed and configured – everything seems good to go with no errors or obvious issues. When I sign in with my Microsoft account and reach this screen, it loads endlessly and doesn't present any errors:

screenshot 2018-10-18 08 44 54

Those blue loading dots at the top scroll across forever. This is after clicking "Personal account" – there is no work/school account, so that flow does not work. I've tried another person's Microsoft account and I get the same result here also. I can also log into my Microsoft account via Safari directly on iOS, and on my computer, without trouble – so I don't think it's something on Microsoft's end.

Any assistance that you can provide would be great! =)

@vmurin
Copy link
Owner

vmurin commented Oct 18, 2018

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 :)

@tgmcguire
Copy link
Author

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

@vmurin
Copy link
Owner

vmurin commented Oct 21, 2018

Glad to help you out!

@Headcult
Copy link

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

@vmurin
Copy link
Owner

vmurin commented Jan 22, 2019

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

@Headcult
Copy link

Headcult commented Jan 23, 2019

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

@Headcult
Copy link

@vmurin Any more pointers on this please?

@vmurin
Copy link
Owner

vmurin commented Jan 24, 2019

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

@MirzaArslan123
Copy link

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

@MirzaArslan123
Copy link

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

@vmurin
Copy link
Owner

vmurin commented Jun 2, 2023

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

See this reply please: #181 (comment)

@MirzaArslan123
Copy link

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

@MirzaArslan123
Copy link

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

@MirzaArslan123
Copy link

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

@MirzaArslan123
Copy link

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

@iamsaadMehmood
Copy link
Contributor

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>

@Monisankarnath
Copy link

Monisankarnath commented Feb 2, 2024

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 ?

@vmurin vmurin added the FAQ label Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants