Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the usage of OAuth 2.0 client id from Google Fit on Android

Im really confused from Google Api platform. Recently guide leads you to generate oAuth Client ID JSON. On the other hand there is no clear reason or need to generate or have at all. Im doing these steps to enable Google Fit on Android:

  1. Get a project on Google APIs
  2. Enable Google Fit API
  3. Create OAuth Client ID on Android
  4. Provide fingerprint and package name (ApplicationID) that's it ..

but what is the usage of that Json file of OAuth Client ID 😐? or that client Id?

111111111111-aaaaaaaaaaaaaaa.apps.googleusercontent.com (sample)

like image 674
Maher Abuthraa Avatar asked Oct 24 '17 21:10

Maher Abuthraa


People also ask

What is OAuth 2.0 client ID?

The client_id is a public identifier for apps. Even though it's public, it's best that it isn't guessable by third parties, so many implementations use something like a 32-character hex string. If the client ID is guessable, it makes it slightly easier to craft phishing attacks against arbitrary applications.

What is OAuth2 in Android?

OAuth2 provides a single value, called an auth token, that represents both the user's identity and the application's authorization to act on the user's behalf.

What is Google OAuth used for?

OAuth 2.0 allows users to share specific data with an application while keeping their usernames, passwords, and other information private. For example, an application can use OAuth 2.0 to obtain permission from users to store files in their Google Drives. This OAuth 2.0 flow is specifically for user authorization.


1 Answers

The OAuth Client ID is obtained so that your app can access the Google Fit API. As the SHA-1 of your certificate is already known by Google Fit, you do not need to enter the actual Client ID into your code. Your certificate is part of your app, and identifies the app to Google Fit.

https://developers.google.com/fit/android/get-api-key

like image 115
Sharon Avatar answered Sep 28 '22 14:09

Sharon