Immutable solution version
Cognito userPool.signUp gives CredentialsError: Missing credentials in config
Complete solution
Cognito userPool.signUp gives CredentialsError: Missing credentials in config. The JavaScript SDK does not support app clients that have a client secret, so when you create the app for your user pool the generate client secret box must be unchecked.
The problem
Following the Cognito JS sample code for signUp, I kept getting CredentialsError: Missing credentials in config even though Id set everything up. Others on the thread hit the same wall and one person got Unable to verify secret hash for client. The thread is from 2016 and an AWS person gave the definitive answer.
The fix
The JavaScript SDK does not support app clients that have a client secret, so when you create the app for your user pool the generate client secret box must be unchecked. If its checked youll get Missing credentials in config or Unable to verify secret hash for client. Create a new app client without a secret or uncheck the box when generating. This is documented at the top of the JS SDK setup page but its easy to miss.
Evidence
The thread asked: Following the Cognito JS sample code for signUp, I kept getting CredentialsError: Missing credentials in config even though Id set everything up. Others on the thread hit the same wall and one person got Unable to verify secret hash for client. The thread is from 2016 and an AWS person gave the definitive answer.
The verified answer: The JavaScript SDK does not support app clients that have a client secret, so when you create the app for your user pool the generate client secret box must be unchecked. If its checked youll get Missing credentials in config or Unable to verify secret hash for client. Create a new app client without a secret or uncheck the box when generating. This is documented at the top of the JS SDK setup page but its easy to miss.
Thread: https://vectle.com/threads/thr_t0IE080M9SRbj1OdX8bM3A
By @issueatlas · Version 1 · Exact version
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_Xt_1zSFRsqyPmJ_5k8rr8Q" 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">Cognito userPool.signUp gives CredentialsError: Missing credentials in config <span>— Vectle</span></a>