-
Notifications
You must be signed in to change notification settings - Fork 327
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
Invalid key hash. The key hash does not match any stored key hashes. #297
Comments
add key hash in message error to app setting 🗡️ |
This key hash it was add in facebook app settings but it is not my key hash. |
I'm having the same problem. if you can resolve this, plz post, I want to now to. |
If your login is working without installing facebook app and not working when facebook app is installed due to error "hash key has not match" then do following steps 1 ) Launch your app and try to log in with facebook. A dialog will open and tell you: "the key has not been found in the facebook developer console and also show the hash key. 2 ) Note down that hash key. 3 ) Put it into your facebook developer console where you first generated your api key and remove the hash key with new and save. Now you are done. Anyone that downloads your app, published with earlier used keystore can log into facebook. |
@saimonventura what do you mean by step 3? I copied the key hash that the error was showing me and replaced it with the one in the facebook app but it still shows me the same error. |
@saimonventura Does you continues do use this hash key in your facebook developer as production? 0.o This is a security fail and needs to be solved! |
Firebase Facebook Login Hash Keys IssueHi, guys. I was working with firebase facebook auth into the react-native app, my problem is the same "key hash". I thought this link should help me, but I did everything and the result is the same problem. Another issue related: For this reason, I need to stay here as an active subscriber if anybody finds the solution, please reach out here. this is my email: [email protected] I will try to solve this problem. SOLVED:::::: The solution just avoids closing facebook session, in develop when you will be in production this problem desapeears. |
I think you guys didn't understand the bug here. This is how to show up the hashkey: ~$ keytool -exportcert -alias my-key-alias -keystore my-release-key_pkcs12.keystore | openssl sha1 -binary | openssl base64
Enter keystore password: xxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx= See more details: https://stackoverflow.com/a/7506445/3332734 Go to Facebook Developers and set the hash key to BUT the problem is to authenticate after this configuration. In the RN the authentication returns error message containing the key hash I set the The thing that should be different here: 1 + 1 = 2 (mathematic) |
i have the same error but when i didn't set any password in "Enter keystore password:" [here i just hit enter] then it works O.O |
I also had the same problem. I just emptied the cash and the app data on my phone after making sure to follow the whole procedure again |
it may also be necessary to add the key mentioned in your error in the "hash keys" field of the interface facebook for developper |
I'm not use this lib anymore. |
Please note, two types of key hashes exist: debug and release. If you use So, when you run When you run YOUR_RELEASE_KEY_ALIAS it's alias from gradle.properties (in most cases) |
After trying every possible solution (with no luck), downloaded a hash key extractor app : https://apkpure.com/key-hash-key/notimeforunch.keyhash Copy pasted the hash key using the app and no more invalid hash key errors. |
If the hash code has be changed, try delete the app from facebook. |
@madmax124 thanks bro, your solution help me 💯 |
@madmax124 thanks, The keyhash generated by the application helped me and there were no problems with facebook, but who knows the difference? |
but the point being, key hash is unique to devices, can someone confirm that is the nature of debug environment? |
This is how i solved this problem Check Out my answer on stackoverflow Or read here first get you SHA1 from keystore file Copy the SHA1 value to your clip board and open http://tomeko.net/online_tools/hex_to_base64.php to convert your SHA1 value to base64. |
@VickySalunkhe thanks it works. |
Solved mine too in Android Studio but with slight different approach. To get the SHA-1 value in Android Studio.
|
@madmax124 thanks |
I have the same issue today. Looks like it is an error of the openssl tool |
Exactly my issue, it ruins some of my hours. |
@bleedweedsuz man you just save me. It works! |
extending @VickySalunkhe answer. |
Was facing the same issue. Just realized that I was generating Android App Bundle so the app signing was managed by Google Play Console. Just use the SHA1 fingerprint from Play Console under App Signing to generate base64 hash and it will work. |
@MMujtabaRoohani Thank you very much, it has worked for me. |
Recently found this Hasher App which helps in extracting keyhash from sha1 (from google play store console) and vice-versa |
Thank you very much! |
I also had the same error, but I found two ways on how to solve it.
|
Thanks man, its working! |
awesome |
Google play sign it if you use app bundle to release, so generate new hash key from signing key SHA 1 from google play store |
superb, this solution is worked. |
#297 (comment) |
Thanks Bro |
@hafsalrahman elaborate please on how to to do it? i am facing the problem, the hash didn't match from facebook login error, |
To get rid of tomeko.net site, you can simply use this shell command to get the same output:
|
@ariona Open PlayStore console -> App signing Then copy SHA1 |
The error doesnt show any hash key! |
@madmax124 thank you. It is working. I entered it manually but got one character wrong. just copy. |
While creating the hash key , the default password is 'android'. If you give any other passwords it wont show an error instead gives you a wrong hash key. That might be your problem. |
I just type the hash value into fc console XD |
Mine has had several lower case L and upper case I. It look forever to figure out, but after zooming in and comparing to their word "Invalid" in the error message, I was able to determine that lower case L are slightly taller than upper case I. The lower case L will go "above" the top of any capital letter. Upper case I will not. |
Go to your google play console -> Setup -> App Intergrity |
thank you so much :# @madmax124 |
Thanks bro, I tried many ways but this was a best way. Download "hash key app" and open it to generate a hash key by click your "project" icon in the srcreen. After that copy and paste in your facebook developer app settings. |
I have just solved the issue of the invalid hash key issue
|
My issue was when i uploaded app to google play store there are a two App signing ( one is my release, second may be auto generated by google not my .debug ) in store. Go to Google console => your project => Setup => App Integrity => App signing key certificate. take your sha1 and convert it to key hash then add to key hashes in facebook app. |
If you are coming from flutter world, what i did was to set behavior to web only
|
I generate the key hash from android keystore following Facebook docs:
https://developers.facebook.com/docs/android/getting-started/#release-key-hash
So.. I implemented all of this lib needs to and I received this error message in my emulator:
The problem is that key hash is not my key hash generated and saved in the facebook developers app configurations.
I make a test: put this "new" key hash in facebook developers key hashes too and tried again and I was able to login successfully.
My doubt is: WTF's going on with this key hashes?
Please I need your help with this.
The text was updated successfully, but these errors were encountered: