I have implemented user signup using @aws-sdk/client-cognito-identity-provider but not able to find the module or API from AWS SDK to implement sign in to cognito
I have implemented user signup using @aws-sdk/client-cognito-identity-provider but not able to find the module or API from AWS SDK to implement sign in to cognito
@aws-sdk/client-cognito-identity-provider is the right lib for what you want to do.
import * as AWS from "@aws-sdk/client-cognito-identity-provider";
const client = new AWS.CognitoIdentityProvider({ region: "REGION" });
client.initiateAuth({
ClientId: '...',
AuthFlow: 'USER_PASSWORD_AUTH',
AuthParameters: {
USERNAME: 'my_test_user',
PASSWORD: '...'
}
}, function(err, data) {});