'How to resolve AWS Cognito SDK error: "Client <XYZ> is configured for secret but secret was not received?"
I'm asking this question because I was surprised how little information I could find from Googling. However, I was able to track down what I think is the root cause. I'll share it as an answer and see if someone is able to elaborate or provide a better explanation.
So, to clarify, I'm using the AWS JavaScript SDK for Cognito. When I tried some of the standard use cases, I received the following error:
Client is configured for secret but secret was not received
What steps can I take to resolve this?
Solution 1:[1]
Looking at the NPM package for Amazon Cognito, I notice that:
When creating the App, the generate client secret box must be unchecked because the JavaScript SDK doesn't support apps that have a client secret.
Checking my app, I found that it had a client secret. I'll try remaking the app without the secret and see if that resolves the issue.
Solution 2:[2]
Even i got the same error , I unchecked the "app client secret" check box during new app client creation in cognito . This solved my problem. Thanks.
Solution 3:[3]
I heard the same issue and I have to delete App Clients. Create a new App Clients and uncheck Generate client secret. Everything worked as expected in my code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Mackie Messer |
Solution 2 | Preetham Godwin |
Solution 3 |