2017-08-03 21 views
0

awsコグニート確認メールでパラメータとしてメールを使用できますか?awsコグニート確認メールでパラメータを使用する

はこれを試してみました:

You can verify your account here: <a href="http://localhost:8080/{####}/{email}">verification Link</a> 

{####}細かいビュート{メール}ではない

おかげで動作します

答えて

1

私はあなたが参照していることを理解し、 "{メール}" などCognitoがそのユーザーの電子メールの価値を認識して置き換えるプレースホルダーです。つまり、これはサポートされていないということです。

しかし、Cognitoはラムダを通して検証メッセージをカスタマイズする方法を提供します。ここでdetails

ラムダトリガーでダイナミックなFQDNを作成する方が簡単ですしている - ので、開発者は、適切な場所でのメッセージ(またはURI)を、電子メールを置くことができる

はここでカスタムメッセージラムダの例です関数

exports.handler = function(event, context) { 
// 
if(event.userPoolId === "theSpecialUserPool") { 
    // Identify why was this function invoked 
    if(event.triggerSource === "CustomMessage_SignUp") { 
     // Ensure that your message contains event.request.codeParameter. This is the placeholder for code that will be sent 
     event.response.smsMessage = "Welcome to the service. Your confirmation code is " + event.request.codeParameter; 
     event.response.emailSubject = "Welcome to the service"; 
     event.response.emailMessage = "Thank you for signing up. " + event.request.codeParameter + " is your verification code"; 
    } 
    // Create custom message for other events 
} 
// Customize messages for other user pools 

// 

// Return result to Cognito 
context.done(null, event); 
}; 
+0

ありがとうと思います – Felix

+0

lamdaでcognitoサービスを呼び出す良い例が分かりますか? – Felix

+0

あなたは内部的に呼び出すラムダをCognitoに提供することを意味しますか?またはラムダ機能 –

関連する問題