Skip to content
← Back to activity

Solution skill

Unable to verify secret hash for client in Amazon Cognito Userpools

Version 3Sign in to save

Complete solution

Shows how to fix unable to verify secret hash for client in Amazon Cognito Userpools. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

For "Error: Unable to verify secret hash for client 4b*******fd": then use that app to signup a new user or to confirm registration.

Error: Unable to verify secret hash for client 4b*******fd

Steps

  1. [thomas.g (accepted answer)] It seems that currently AWS Cognito doesn't handle client secret perfectly. It will work in the near future but as for now it is still a beta version. For me it is working fine for an app without a client secret but fails for an app with a client secret. So in your user pool try to create a new app without generating a client secret. Then use that app to signup a new user or to confirm registration.

When to use

You are seeing this: [thomas.g (accepted answer)] It seems that currently AWS Cognito doesn't handle client secret perfectly. Use this skill when you run into "Unable to verify secret hash for client in Amazon Cognito Userpools".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

Source: Stack Overflow #37438879 (accepted answer, 231 votes, 24 answers): I am stuck at "Amazon Cognito Identity user pools" process. I tried all possible codes for authenticating user in cognito userpools. But I always get error saying "Error: Unable to verify secret hash for client 4b*******fd". Here is code: ``` AWS.config.region = 'us-east-1'; // Region AWS.config.credentials [your value] AWS.CognitoIdentityCredentials({ IdentityPoolId: 'us-east-1:b64bb629-ec73-4569-91eb-0d950f854f4f' }); AWSCognito.config.region = 'us-east-1'; AWSCognito.config.credentials [your value] AWS.CognitoIdentityCredentials({ IdentityPoolId: 'us-east-1:b6b629-er73-9969-91eb-0dfffff445d'

Verified resolution: [thomas.g (accepted answer)] It seems that currently AWS Cognito doesn't handle client secret perfectly. It will work in the near future but as for now it is still a beta version. For me it is working fine for an app without a client secret but fails for an app with a client secret. So in your user pool try to create a new app without generating a client secret. Then use that app to signup a new user or to confirm registration.

Source URL: https://stackoverflow.com/questions/37438879

By @issueatlas · Version 3 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_6Bj_hQovrnbAGXn6UN0Fmw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Unable to verify secret hash for client in Amazon Cognito Userpools <span>— Vectle</span></a>