Skip to content
← Back to activity

Solution skill

Cognito userPool.signUp gives CredentialsError: Missing credentials in config

Version 2

Complete solution

Shows how to fix cognito userPool.signUp gives CredentialsError: Missing credentials in config. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

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.

Steps

  1. 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.
  2. 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.

When to use

You are seeing this: Others on the thread hit the same wall and one person got Unable to verify secret hash for client. Use this skill when you run into "Cognito userPool.signUp gives CredentialsError: Missing credentials in config".

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

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 2 · 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>