问题
I have generated my SHA1 code from my keystore but when I try to create an OAuth client 2.0, Google game console is giving me the error: "Certificate fingerprint is invalid".
Anyone knows why this happens? How do I fix this?
回答1:
I've contacted Google Play Developer Support about this issue (I've got a same problem). Here is their answer : Please ensure the key is set to 2048 bit and is valid for at least 25 years.
I've tried it, but sadly my debug.keystore is still not getting accepted, maybe there will be some luck on your side.
$ keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000
回答2:
I'm Dan, and I'm a software engineer on Play Games Services.
First, let me thank you for using our service, and apologize for the inconvenience caused. We have discovered a bug in our product that prevents users from linking fingerprints of their signing keys to newly created applications. The issue has been fixed and you should be able to link your application as expected.
If you encounter a bug in the feature, please let us know using the bug report tool (Help -> Need more help? -> Send feedback & report bugs).
回答3:
Ok that is weird. I encountered the same problem. while I have done this numerous time in the past, never had this issue before. I tried with multiple options but still no go. So figured out a workaround. Thought of sharing it to save time:
- Once you create a Game Service, You will get the API console project under -> Game Details > Api Console Project
- Click your API project, and it should take you to your API console project.
- Create Auth SHA1 keys by choosing credentials > create credentials.
Now, Google site do suggest not to do it
Warning: Do not create new client IDs for your game from the Google API Console. If you do so, Google Play games services will not associate your game settings with the client ID, and this could cause errors during gameplay. https://developers.google.com/games/services/console/enabling
But as far I Have only one Sha1 for this package, I think we are good. I can confirm that my project is working fine and I am able to successfully linked the app. Although, I have still not tested all my games features.
Also, I am still figuring out the reason on why it works from Google API console with the same Sha1 key and package and will not work if I use the same combination from Play console -> linked apps. I will update on this thread as I learn more. Perhaps Google is changing the OAuth screen consent screen, may be this is a new change now.
来源:https://stackoverflow.com/questions/56603397/certificate-fingerprint-is-invalid