私のユーザープールのためのAuth Challenge
として、私はラムダ機能を定義しました。この機能は、ワンタッチ認証を要求するために、Authyに要求を送信します。認証チャレンジトリガーはいつ実行されますか?
この設定では、Autogn Multi-Factor認証をCognitoログインプロセスに追加したいと考えています。
しかし、私が認証するときに、ユーザー名とパスワードでCognitoユーザーをログインしてください。このラムダ機能は起動しません!
どうしますか? Lambdaトリガは登録プロセス用にのみ定義されていますか?ありがとう
---------------------アップデート:----------------------ユーザー名とパスワードが必要です--------------------------
マイログインコード、:
authenticate(userName, userPassword) {
var userData = {Username: userName, Pool : CognitoUserPool}
var cognitoUser = new AWSCognito.CognitoIdentityServiceProvider.CognitoUser(userData);
var authenticationData = {Username : userName, Password : userPassword};
var authenticationDetails = new AWSCognito.CognitoIdentityServiceProvider.AuthenticationDetails(authenticationData);
cognitoUser.authenticateUser(authenticationDetails, {
onSuccess: function (session) {
AWSInitialize(cognitoUser, session);
face.showHome();
}.bind(this),
mfaRequired: function(session){
new MFAConfirmation(cognitoUser, 'login');
},
onFailure: function(err) {
alert(err);
}
});
};
トリガー定義されています
あなたは正式なチャレンジを意味しますか?ユーザー認証のための新しいカスタム認証ステージですか?どのようにあなたがそれを呼び出しているか/ユーザを認証しているかを表示できますか? –
@JeffBailey私の更新を参照してください、これはあなたの質問を理解するのに役立ちますか?ご協力いただきありがとうございます! –