Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What exactly is the client secret for Google OAuth2?

Tags:

In Google's OIDC guide, section Exchange code for access token and ID token states that I must provide a client_secret.

If I select the relevant client ID from the API console, I do indeed get a JSON file named client_secret_.... However, none of the fields of the JSON object are named secret or anything similar. (The fields are named client_id, project_id, auth_uri, token_uri, auth_provider_x509_cert_url, and redirect_uris.)

So, where do I get this client_secret?

like image 882
Jon Smark Avatar asked Jan 30 '17 11:01

Jon Smark


People also ask

What is client secret used for OAuth2?

Client Secret The client_secret is a secret known only to the application and the authorization server. It is essential the application's own password.

What is Google client secret?

The Google APIs client library for . NET uses client_secrets. json files for storing the client_id , client_secret , and other OAuth 2.0 parameters. A client_secrets.json file is a JSON formatted file containing the client ID, client secret, and other OAuth 2.0 parameters.

What is the client secret Google API?

The Google APIs Client Library for Python uses the client_secrets. json file format for storing the client_id , client_secret , and other OAuth 2.0 parameters. See Creating authorization credentials for how to obtain a client_secrets.

What is client ID and client secret in OAuth2?

The Client ID is a public identifier of your application. The Client Secret is confidential and should only be used to authenticate your application and make requests to LinkedIn's APIs.


1 Answers

I think the secrete used to be in the file but alternatively you can also find it by looking at the page were you downloaded your json file and you can also click the button to reset said secret.

enter image description here

I would make sure that the credentials are looking at are under OAuth 2.0 client IDs and not Service account keys or API keys only the first one needs a secret I believe.

Update from comments: Creating Oauth Client Id for android will not give you a secret because its not needed in android application should should probably be following Add google sign-in to your android App

like image 164
DaImTo Avatar answered Sep 22 '22 10:09

DaImTo