I have one query regarding usage of client Id in Google Developers console.
For one project, someone had created one clientId for using Google fit API's for storing fitness data. And I don't have the credentials for account used for creating the Client-id. Also I'm not able to find the client-id anywhere in code.
Now I want to add Google Sign-in using "AppAuth for Android". For which I need to add clientId and redirectUri in code.
My question is, can I create new clientId and redirectUri with any other account using same SHA1 fingerprint and package name? or Do I have to use the same existing client-id? (which doesn't seem to be a possible way)
Edit1:
As #iainmcgin mentioned I tried to create one using the same SHA-1 and package name, but getting below error.
The fingerprint that you specified is already being used by an Android OAuth2 client ID in this project or another project.
Google engineer on the Google Identity Platform team here - we enforce a 1:1 mapping between client IDs and package name + certificate hash, so you can't create another client ID. You'll need to regain access to the project that defined the original client ID; if you are not able to do that, contact me at iainmcgin#google.com with the details of your app and I'll try and put you in touch with people that can verify your ownership of the app and either delete the original client, or give you access to the original project, whichever turns out to be more appropriate.
Related
I'm trying to create a new OAuth Client ID in Google cloud platform and I'm getting this message all the time but:
I don't have this fingerprint used by this or another project
The oauth list of IDs is empty
I only have that JSON translations API, apart from that it's empty, not sure what to change.
I have Firebase with Facebook/Gmail/Apple/email oauth for the login and I'd need this API for this: https://www.syncfusion.com/kb/12116/how-to-add-google-calendar-events-to-the-flutter-event-calendar-sfcalendar
It seems there is already an android app using the same package name which you are trying to use.
You can try to validate the same by trying a different package once and see if you are able to complete your process without the error.
We are developing an SDK for developers which in core depends on Firebase to get tokens, therefore we are using FirebaseOptions to initialize our firebaseInstance
In the new firebase updates they said: we should provide APP_ID and API_KEY.
Is there any alternative for that as SDK developers?
If not, is there a way to get API_KEY from dashboard instead of download the googel-service.json and extract from it manually?
Both API key and App ID can be found in the Firebase console too.
The API key you need is called Web API Key and can be found in the general gettings screen in the Firebase console.
The App ID can be found when you select a specific app from that general setting screen, and is under the label App ID
So, I am building an Android module that will be provided to android apps as a Gradle dependency (or AAR package). Eg. Just like Mixpanel, Google Analytics provide their modules to interact with their services, we will be providing our service's SDK to interact easily with our service.
I'll refer our module as SDK and the app in which it is included as Parent App.
For enhances user experience, we would like to fetch an ID_TOKEN of the user using the Parent App. But fetching an ID_TOKEN involves creating a Client ID in cloud.google.com using the SHA1 signature of the build key and the name of the package.
When someone would be including our SDK in their apps (Parent App), we cannot know what the SHA1 signature of their build key is and what the name of their package is.
I was wondering how we can achieve this. Or a better question: Is it something that can be done only if we ask in OUR OWN apps?
Thanks for this.
I assume you are referring to ID token for a Google account (i.e. sign in with Google).
First of all, GoogleAuthUtil.getToken was the legacy way of retrieving an ID token, which won't give you the best user experience. Check out this blog post for details:
http://android-developers.blogspot.com/2016/05/improving-security-and-user-experience.html
You should use Auth.GOOGLE_SIGN_IN_API instead for ID token retrieval:
https://developers.google.com/identity/sign-in/android/backend-auth#send-the-id-token-to-your-server
Second, if it's "Parent App" that requests a token, the app's identity will be "Parent App" to Google's OAuth backend, and you are right, no way you can masquerade the token retrieval as your app. (And it doesn't make sense if you could masquerade as one single app. Assuming you distribute your SDK to 100 apps, user giving OAuth grant to app 1 should not make app 2 auto get the grant).
But as long as you:
Ask your SDK consumers to register with Google:
https://developers.google.com/identity/sign-in/android/start-integrating#get-config
Ask them to share with you their registered client ID for "Web
Application" type and you can help them generate a config file your
SDK is capable of reading.
In your Android SDK / module, you read the config file and use the client id when GoogleSignInOptions.Builder.requestIdToken(CLIENT_ID_FROM_CONFIG_FILE)
On your server, make sure to check ID token's 'audience' is one of
the registered client IDs.
Then it should work.
Hope it helps.
I have been struggling with setting up my app in the Android Developer Console. Specifically, I need to set up and assign a client ID to the App (or linked app, not sure), however, I am unable to do so.
Any attempt to create the client ID I am told one already exists. Yet, I can not publish my app since the app is not linked to one with a client ID.. or so I gather.
//I am unable to press the create button. I am blocked out from doing so.
///the step required to publish.
You need to provide the correct package name that your app uses as well as generate the fingerprint using key gen and paste that key there. Without those, you cannot create a client id for your app. The required steps are explained in great detail in their help pages.
I am trying to follow instructions here:
Verifying Back-End Calls from Android Apps
I'm expanding on the question I asked here:
identifying which android app is making contact with my appengine app
all was going well in my test environment. I had a debug.keystore that my app was using in eclipse, and I even received tokens from my calls to GoogleAuthUtil.getToken(). Then I copied my code to the actual project that it will be used in. I got the keystore (I had saved it from previous publishing on google play) and used it to create a new client ID on the Google APIs Console.
Then I use eclipse to export my project, but after using the right keystore and the associated ID, I am not getting tokens.
Meanwhile I've been trying different things. I had an ID that I made for my app engine app. I used that in the android app and I was given a token. I don't know weather or not that particular token would be cleared when I checked it on my app engine site (I suspect not) but I got a token from it.
I'm kinda assuming that the ID that I'm supposed to use with my android call to GoogleAuthUtil.getToken() is supposed to be from the 'Client ID for installed applications' section (of the Google API page). Is this not so? Only there can you set the application type to 'Android' and the package name to match your application... right?
I assume you're specifying a client_id using the format:
audience:server:client_id:$client_id
This client_id, as the format above tries to hint, is for your home server, in this case the AppEngine app's client_id (a web application client_id). It should verify nicely in AppEngine if you configure your AppEngine app properly.
Again, your Android app asks for a token and names your AppEngine App. You don't need to name your Android app's client_id in the request because the Android platform can recognize your app based on the package name and certificate hash you computed using the keystore tool.