0
我可以在aws cognito驗證電子郵件中使用電子郵件作爲參數嗎?使用參數的aws cognito驗證電子郵件
嘗試這樣做:
You can verify your account here: <a href="http://localhost:8080/{####}/{email}">verification Link</a>
{} ####工作正常弼{EMAIL}不是
感謝
我可以在aws cognito驗證電子郵件中使用電子郵件作爲參數嗎?使用參數的aws cognito驗證電子郵件
嘗試這樣做:
You can verify your account here: <a href="http://localhost:8080/{####}/{email}">verification Link</a>
{} ####工作正常弼{EMAIL}不是
感謝
我知道你指的是 「{EMAIL}」 爲Cognito將識別並替換該用戶的電子郵件的值的佔位符。所以如果你的意思是不支持。
然而,Cognito提供了一種通過lambda定製驗證消息的方法。下面是details
更容易在lambda觸發創建一個動態的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);
};
謝謝你會檢查出 – Felix
你知道一個很好的例子,用lamda調用cognito服務嗎? – Felix
您的意思是向Cognito提供一個內部調用的lambda表達式?或者如何從lambda函數 –