The Google OAuth client secret is not shown in Cloud Console
Client secret shows only ****abcdShort answer
Google stores client secrets hashed. The full value can be seen and downloaded only when it is created; later the console shows the last four characters. If you lost it, add a new secret on the client's details page and rotate. Some client types, such as JavaScript apps, have no secret at all.
Fix it fast
1Find out which cause you have
Open the client in the Google Auth Platform Clients page and look at what the secrets section shows and what the client type is.
# Google Cloud Console > Google Auth Platform > Clients > select your client2Match what you see, then jump to its fix
What does the error look like?
Client secret shows only ****abcdNo client secret field for the OAuth client
Cause 1 of 2
The secret was created earlier and is no longer viewable
1Check
Google says client secrets are visible and downloadable only at creation time. The console keeps the last four characters so you can tell secrets apart.
# Clients > your client > Client secrets section2Fix
Add a new secret, then rotate. A client holds at most two secrets, so disable and delete one first if both slots are used. Copy the new value immediately into your secret store.
# 1. Clients > your client > Add secret
# 2. Save the new value in your secret manager
# 3. Deploy the app with the new value
# 4. Disable the old secret, then delete it3Verify
Your app completes the token exchange with the new secret.
# sign in through the app; the token request should succeedConfirmed by support.google.com
Cause 2 of 2
This client type does not use a secret
1Check
Google's OAuth overview says a JavaScript application does not require a secret, but a web server application does. Installed apps (Android, iOS, desktop) may get a secret that is not treated as confidential.
# Clients > your client > Application type2Fix
For a JavaScript app, send no client_secret. If your backend needs one, create a Web application client for the server side instead.
# Web application client: has client_id and client_secret
# JavaScript-only app: use the client_id alone3Verify
The flow works without a secret, or the new Web client returns tokens from the server.
# complete one sign-in and check the token responseConfirmed by developers.google.com
How do I stop it coming back?
- Store the secret in a secret manager the moment it is created.
- Rotate secrets by adding the new one first; delete the old one only after the app uses the new one.
- Never ship a secret inside a mobile or browser app.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Related fixes
Security
Entra ID token request fails: the request body must contain the parameter 'grant_type'
AADSTS900144: The request body must contain the following parameter: 'grant_type'.
The token endpoint did not find grant_type in the form body of your POST.
3 causes, each with a fixSecurity
Angular HttpClient does not add the X-XSRF-TOKEN header to a request
403 Forbidden on POST, PUT or DELETE while GET works
Angular copies the XSRF-TOKEN cookie into an X-XSRF-TOKEN header only for mutating requests to the same origin, and only when the cookie is readable by script.
5 causes, each with a fixSecurity
An [Authorize] endpoint rejects a request with a bearer token
Authorization Header sent: no Bearer token sent.
An [Authorize] endpoint without a policy name requires an authenticated user.
4 causes, each with a fixSecurity
ASP.NET Core API rejects an Angular user's token: the signature key was not found
401 Unauthorized
The API looked for the key named by the token's kid in the key set it downloaded from your Authority, and the key was not there.
4 causes, each with a fixSecurity
ASP.NET Core rejects the token before checking it: IDX12741, three segments expected
401 Unauthorized
IDX12741 means the string the API pulled out of the Authorization header is not shaped like a JWT: a signed token has three dot-separated parts and an encrypted one has five.
3 causes, each with a fixSecurity
A Microsoft Entra access token shows Invalid Signature when you check it yourself
Tokens that a Microsoft API receives might not always be a JWT that can be decoded
A token issued for Microsoft Graph is not meant for you to validate, so a failed signature check is expected.
2 causes, each with a fix