Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

Facebook redirect issue on iOS #212

Closed
NikJaySix opened this issue Nov 17, 2016 · 5 comments
Closed

Facebook redirect issue on iOS #212

NikJaySix opened this issue Nov 17, 2016 · 5 comments
Milestone

Comments

@NikJaySix
Copy link

Hi, i know this has been mentioned in previous issues (#115 & #107), however i am still getting this issue on my device running iOS 10.

I have followed all the instructions but i still get redirected to a blank page and the user record isn't added to firebase. But sometimes it doesn't do that at all and just redirects back to the login screen with this error:

FBSDKLog: Invalid identifier: 'fb_mobile_login_native_app_switch_dialog_result'. Must be between 1 and 40 characters, and must be contain only alphanumerics, _, - or spaces, starting with alphanumeric or _.
CONSOLE LOG file:///app/pages/login/login.component.js:22:24: login cancelled

Any ideas? Many thanks

@EddyVerbruggen
Copy link
Owner

Note to self: SO issue

@EddyVerbruggen EddyVerbruggen added this to the 3.8.0 milestone Nov 18, 2016
@EddyVerbruggen
Copy link
Owner

FYI: wasn't able to reproduce this issue until now. Perhaps because of the Facebook config I've added to the plist in the demo app.

@NikJaySix
Copy link
Author

The facebook portion of the info plist was auto generated so i'm not sure what the solution to this issue is? I am still getting the same issue as above when i try to login with fb for the first time. any subsequent attemps say ive already authorised the app and then i get redirected to a blank page. I have to deauthorize the app within my facebook settings in order to get the original error again.

Is there something wrong with my info.plist?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleDevelopmentRegion</key>
	<string>en</string>
	<key>CFBundleDisplayName</key>
	<string>${PRODUCT_NAME}</string>
	<key>CFBundleExecutable</key>
	<string>${EXECUTABLE_NAME}</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>1.0</string>
	<key>CFBundleSignature</key>
	<string>????</string>
	<key>CFBundleVersion</key>
	<string>1.0</string>
	<key>LSRequiresIPhoneOS</key>
	<true/>
	<key>UILaunchStoryboardName</key>
	<string>LaunchScreen</string>
	<key>UIRequiresFullScreen</key>
	<true/>
	<key>UIRequiredDeviceCapabilities</key>
	<array>
		<string>armv7</string>
	</array>
	<key>UISupportedInterfaceOrientations</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>

	</array>
	<key>UISupportedInterfaceOrientations~ipad</key>
	<array>
		<string>UIInterfaceOrientationPortrait</string>

	</array>
	<key>CFBundleURLTypes</key>
        <array>
          <dict>
            <key>CFBundleURLSchemes</key>
            <array>
              <string>fb397687883954848</string>
            </array>
          </dict>
        </array>
	<key>FacebookAppID</key>
    	<string>397687883954848</string>
    	<key>FacebookDisplayName</key>
    	<string>I Forgot Milk</string>
    	<key>LSApplicationQueriesSchemes</key>
    	<array>
    		<string>fbapi</string>
    		<string>fb-messenger-api</string>
    		<string>fbauth2</string>
    		<string>fbshareextension</string>
    	</array>
    	<key>UIBackgroundModes</key>
    	<array>
    		<string>remote-notification</string>
    </array>
</dict>
</plist>

Would this have anything to do with the facebook app being in sandbox mode? i am trying to login with the account that maintains the fb developer account so i should theoretically have permission to access the app automatically, unless there is something special i have to do to grant myself permission to use the app?

@NikJaySix
Copy link
Author

NikJaySix commented Nov 22, 2016

An update to this, i switched all the auth settings in the facebook app to ON, just to see if i had configured it correctly, so now i no longer get the error mentioned above, i must have missed a configuration setting that i didnt think was needed for ios, but i still get redirected to a blank page and the login details arent added to firebase, however according to facebook i have successfully been authorised. So its not switching back to the app, or sending the user info to firebase.

I googled the blank page issue and theres a lot of talk about it, and i see you did address this and made changes to accommodate.. Would there be any specific reason why it would still be happening for me? i have the latest npm version of your plugin.. could it be any other setting?

@kvindascr
Copy link

Hello I had the same issue.
In my case it was related to a conflict between AppDelegates on IOS in specific.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants