Flutter Google service leader board not working - flutter

I'm using this Flutter package to interface with the Google game service https://pub.dev/packages/games_services
I think I configured the game service in Google play console correctly and implemented codes in my project. Although my app is showing and submitting the score to the iOS game center, but my app can not show the leaderboard nor submitting a score as well.
I published my app in the Google play console and linked this app in the Game service in Google play console. Actually I set up the Firebase AdMob as well, so I configured my app with the SHA1 fingerprint through the Firebase(It created the OAuth ClientID, etc. automatically in Google API console) before I linked my app in Google game service.
I'm suspicious that the credentials including OAuth ClientID, etc. were not created by Google play console.
Can anybody give me a tip to resolve this issue?

Do you mean that your leaderboards are running correctly in iOS game center?
If not, you may have to make sure that your implementation is correct first.
If you suspect it's an OAuth credentials issue, you can try linking a second SHA1 fingerprint as described in Google's official documentation.
In "Check the certificate fingerprint" section:
Note: If you are debugging your game using your debug certificate but
have configured games services using your release certificate, you
should add a second linked app using the same package name and your
debug certificate's SHA1 fingerprint. This will allow you to sign in
to the application whether it's signed with the debug or release
certificates.
Google Play Console default has a managed App Signing feature that will replace your upload key with a Google-managed key, which may cause fingerprint mismatch that you described.

Related

Firebase Identity Platform Release Version Authentication Problem

I wasn't having such a problem when using the old Firebase authentication methods. After accepting Identity Platform, my gmail and phone auth systems are not working in "android release" mode of my app (downloaded play store app). I'm currently search of the reason for this. I also put the sha keys to Firebase from Google Console App Signing and i also debugging authentication code base with test phone numbers and test gmails. There is no problem in code base or sha keys(my opinion). Now I am verifying oauth in Google Cloud Console. When this verification is verified, will my gmail and phone auths in android release mode be opened? And how long does this verification process take? Ios gmail and phone auth methods work well in the apple store or emulator. Also when i look at Google Cloud Console there are some errors on Identity Toolkit Api and Token Service Api.[enter image description here](https://i.stack.imgur.com/BeF3a.png)
I think the cause of the problem is identity platform integration and this validation for oauth. For what other reason do you think the firebase authentication systems (gmail and phone) works on iOS but not on Android?

Same google clientId and clientSecret for multiple devices (andorid, ios and web)

I am developing an application using Supabase, Flutter and Google OAuth and I would like to know if it is possible to have a single clientId and clientSecret for each device type (ios, android and web) so that I don't have to implement a different authentication workflow for each device.
I have tried looking around the Google Console and see if it is possible to create a single authentication API for multiple devices. I also tried searching online.
There are sevral types of Oauth2 clients.
installed app client (for applications run on the machine)
web app clients (for applications run on web servers)
Android app clients (for applications run on android devices)
IOS app clients (for applications run on Iosdevices)
The authorization method for these three types is different, the code used to authorize them is also different. They can not be mixed.
Android app requires SHA-1 certificate fingerprint
Ios app requires App Store ID
web app requires a redirect uri
So the answer is no you can not create one type of credential to work with Android, Ios and web, you need three different credential types.
a bit of sdk magic
If a user authorizes your web app, they may not need to authorize your android and Ios apps as long as the credentials are all part of the same project on Google developer console.
Last I checked this is not true the other way around, if a user authorizes android or ios first and then tries web they will need to authorize again.
My guess is this is something baked into the android and ios sdk on googles side that is not part of the respective client libraries for web. Either that or its something in the authorization code grant that isn't in the mobile code grant type for Oauth2 I have never bothered to dig to far into it.

Google Play Services won't work because Firebase creates another oath client ID

My app has been published for a couple years and all was well, Google play services was working and the app was integrated with Firebase. Then I upgraded to app signing, and in doing so somehow I managed to have the wrong OAuth client ID show up in the google_services.json file. In the Firebase developer docs it says you can delete your Firebase project then create a new one, importing existing app. When I do that it creates yet another OAuth client ID, ignoring the one in Game Play Services.
Signing in with Google works, but scores and times are not being posted to Leaderboards. I want to continue using Firebase for analytics, dynamic links and app invites. Does anyone know how to proceed to get back to having functioning leaderboards and achievements?
I have solved this issue. First, you'll know you have this issue if the OAuth client ID in your google_services.json file does not match the Oauth Client ID under "linked apps" in game play services.
The solution is to:
1) Unlink your app in Firebase, by going to settings, integration, and clicking un-link.
2) Next, go to the developer console and under game services, app details, you should be able to click through a link to see your app in the app console. There you'll see the Oauth ID. If it does not match the one in your google_services.json file, delete it.
3) Go to "linked apps" in game services, and create another Oauth client ID by clicking "link another app".
4) Once you have linked your app again, you should see a link that says "Add Firebase to your app". Click that link to add Firebase, and follow the steps.
5) Make sure to download the new google_services.json file into the app\ directory of your Android Studio project.
6) Re-build your project and you should be all set. Note that the Oauth client ID in your google_services.json file will now match the new one you created in the Developer Console.

App working on dialogflow but not on Actions on Google Simulator

Recently, I have launched an app named 'Voice Cricket' on the google assistant skill store and it has been deployed successfully. I was trying to implement new features in the app, but when I tested my app successfully on dialogflow test console, I shifted over to Actions on Google simulator where I am getting this error
expected_inputs[0].input_prompt.rich_initial_prompt: 'rich_response'
must contain at least one item.
with response as
Voice Cricket isn't responding right now. Try again soon.
And now, I am unable to play the game on my device(getting same response as above) which is linked to the same google account on which I am building the app but when I tried playing the app on my friend's phone, it was working perfectly.
What could be the scenario? Where I might be wrong?
I even tried printing the logs on the firebase console which I am using in my app, but none is being shown.
P.S. - I am also confused about the status shown on my assistant console which is 'Deployed' but according to documentation, these can be possible status of your app, in which 'Deployed' is not one of them. Why is it so?

How to list certificates from the iPhone keychain inside my app?

I am creating an iPhone app where we want to use x.509 certificates for client authentication. The user can install their cert from an email... It shows up under Settings -> General -> Profiles...
However I am unable to read these certificate from my app...
I want to provide an interface similar to provided by Junos Pulse VPN client... A configuration window listing all the certificates in the device keychain and let the user select their identity.
How do I go about achieving this???
The Junos Pulse app is apparently getting its access via a VPN plugin which is a private API supplied by Apple on an invitation-only basis. That API is giving the app access to those certificates otherwise accessible only to built-in iOS apps like Safari.
Review the following which were very helpful when I was researching the topic:
iOS get Configuration Profiles that are installed
(Apple Development post linked in one of the answers)
https://devforums.apple.com/message/660579#660579
You cannot access that keychain. And, yes, use search.
From Apple Docs:
The iOS gives an application access to only its own keychain items.
Read more here: Keychain Services Programming Guide