Login Error There Is an Error in Logging You Into This Application Please Try Again Later Sptofy
Set "Login Fault: At that place is an error in logging you into this application" on Facebook Login due west/ Android
Hello guys, yous might be facing this error "Login Fault: there is an mistake in logging y'all into this application" when running your app in a production environment. (If yous are facing whatsoever upshot in evolution fashion make sure to checkout App setup hither) This mistake ONLY happens when users have the Facebook app installed, so but in instance, if you don't confront whatsoever result on your device, brand sure to verify with the Facebook app installed as well.
Background Information:
I've been using Facebook login with react-native and it was working perfectly on the development build, afterward when I released the app when the user clicks the Facebook login button, it shows an error similar below.
And then there are two solutions for this. The first approach is easier but non an Actual solution though and I would not encourage you to employ that, only let's check both methods.
First method: (Not recommended, as information technology might inquire the user to enter a countersign)
When you are making a sign-in request similar this:
expect LoginManager.logInWithPermissions(["public_profile", "email"]) Just earlier this brand certain to add the post-obit code:
if (Platform.Bone === "android") {
LoginManager.setLoginBehavior("web_only")
}expect LoginManager.logInWithPermissions(["public_profile", "electronic mail"])
This way, the Facebook login will use the browser to get the user logged in, so at that place are chances that users will be prompted to enter the password again, equally not everyone keeps their social accounts logged in a browser. That'southward information technology, this volition get in work, only more annoying to users in-app experience.
Second Method: Recommended (Add app signing fundamental hash to your Facebook developer console)
Start of all, allow'southward simply understand what we need to practice hither. Every bit you lot might know, when setting upwardly the Facebook app on the developer panel you might have seen the field "Key Hashes". Allow'south first empathize what key hash is and why they are required.
What are fundamental hashes?
Key hashes are 28 characters including the trailing = and are express to the post-obit characters: [a-zA-Z0–9+/=]
Why key hashes are required?
And then whenever whatever login request is initiated from your application Facebook uses the central hash to authenticate interactions betwixt your app and the Facebook app. So if your key hashes are non added information technology volition not permit LoginManager to proceed further, and go along it as unauthorized access.
How to fix it?
To fix this issue, Make sure yous already uploaded your app to the play shop and enabled "app signing by Google Play".
- Login into your Play Panel account
- Click on the app with which you are facing an issue
- Now from the left sidebar go to Setup => App Signing, where you volition see something like this
- Under "App signing document" copy the SHA-ane certificate fingerprint
- At present catechumen your SHA-i to a valid cardinal hash using any of these methods.
Method 1: Online Tool.
- Open this online tool to convert it to a valid fundamental hash.
- Paste the SHA-1 in the kickoff field
- Re-create the text from Output (base64)
Method 2: Control line
- If you lot do not want to use the online tool to protect your SHA-i, you can use this control, while executing it, make sure to supplant PASTE_YOUR_SHA1_HERE with your SHA-1.
node -east 'console.log(Buffer.from(process.argv[1].split(":").map(hex => parseInt(hex, 16))).toString("base64"))' 'PASTE_YOUR_SHA1_HERE' - It will print your SHA-1 in the panel, and yous can copy it from there.
Once y'all have Key Hash generated:
- Go to developer.facebook.com/apps
- Open your app and from the left sidebar go to "Settings" -> "Basic".
- Scroll downward below where you lot see Cardinal Hashes, and paste the copied Output (base64) here & Relieve Changes.
- That'southward it.
I've simply tried this with Google Signed Awarding. If you are signing your application past yourself, this method might not piece of work, but yous can effort converting your SHA-1 certificate fingerprint to base64 and paste that into key hashes. If this works, feel free to add a comment below and then that it tin can help other people as well.
Thanks for reading, Follow me for more than stuff related to Full-stack development. Happy coding, Stay safe!
More content at plainenglish.io
Source: https://javascript.plainenglish.io/fix-login-error-there-is-an-error-in-logging-you-into-this-application-on-facebook-login-with-237e3baba116
0 Response to "Login Error There Is an Error in Logging You Into This Application Please Try Again Later Sptofy"
Post a Comment