小编Car*_*arl的帖子

AWS Cognito 错误:没有为未经身份验证的访问提供 Cognito 身份池

var normalAuth = async (username, password) => {   
    try{
        var user = await Auth.signIn(username, password)
        console.log(user)
        if(user.challengeName === "NEW_PASSWORD_REQUIRED"){
            console.log("assigning new password!")
            user = await Auth.completeNewPassword(user, "password") // give the user a new password. this would NOT be included in any kind of production code, its only here as a work around
            console.log(user)
        } // work around. users created in the console are only given temporary passwords, and as such have no authorization
        // setting a new password will fix …
Run Code Online (Sandbox Code Playgroud)

amazon-web-services amazon-cognito aws-amplify

10
推荐指数
0
解决办法
9323
查看次数