Identity and Access Management
A browser application calls Amazon Cognito user pool authentication directly and receives an error indicating that SECRET_HASH is missing; its app client has a client secret. Which change resolves this without embedding a secret in browser code?
Show the answer
Correct answerA. Use an app client without a client secret
AWhy this is right: An app client without a secret supports public clients that cannot securely store confidential credentials.
BWhy not this: STS permissions do not resolve a user pool app client's SECRET_HASH requirement.
CWhy not this: Local storage is accessible to client-side code and cannot protect a client secret.
DWhy not this: Callback URL configuration does not remove the secret-hash requirement for direct authentication calls.
A browser is a public client and cannot securely retain a client secret, so direct authentication should use an app client without one. Storing the secret locally exposes it and does not provide secure client authentication.