Open sagshar5 opened 4 months ago
Hey👋 thanks for raising this! I'm going to transfer this over to our JS repository for better assistance 🙂
Hello, @sagshar5 and thanks for creating this issue. To address the question on Gen 2 support, this is NOT currently supported out of the box at this time. As such, we'll mark this as a feature request.
We'll follow up with any additional questions or updates we have on this from here, but feel free to add any additional context for use cases or implementations you're looking for in Gen 2 as well. Thanks!
@sagshar5, did you run into this only after upgrading to v6 or using Gen2?
Having same issue, does anyone know a workaround?
You have to disable the client secret when you create the userPool. Unfortunately you cannot disable the client secret for a created userPool as far as I can see.
This is very frustrating! Can't believe that amplify doesn't support the SECRET_HASH
. With modern frameworks like NEXT.js that have a FE servers where the auth interactions occur.
The workaround we used was to use
import {
CognitoIdentityProviderClient,
InitiateAuthCommand,
} from "@aws-sdk/client-cognito-identity-provider"
Environment information
Description
An Amazon Cognito user pool enabled with Client secret is imported to Amplify Gen 2 project.
Unable to find any way to pass Secret_hash value to cognito using auth library signIn() or signUp() method.
Sample signIn()
Using above signUp() method, can see in browser console that the secretHash value is passed. However, still getting :
Can you please advise if we can use Amplify Gen 2 with Cognito user pool having client enabled client secret ?