パスワードのリセット
ユーザーの登録が成功した後、以下のコードスニペットを使用してパスワードをリセットできます。resetPassword() メソッドを呼び出すと、パスワードリセットリンクが生成され、ユーザーのメールアドレスに送信されます。以下のコードスニペットで使用している userManagement の参照は、コンポーネントインスタンスです。
Note:
-
EmailID と Platform type は必須の属性です。
-
送信者のメールアドレス、件名、メールメッセージを設定できます。SDK コードで使用する前に、Catalyst Mail Component でメールアドレスを追加し、認証を完了させる必要があります。
設定 JSON の作成
特定のユーザーの登録情報を含む JSON オブジェクトを以下のように作成します。
copy
//ユーザーの設定オブジェクトを作成する
const signupConfig = { platform_type: 'web', zaid: 10014774358, template_details: {
'senders_mail':'dogogetu@tutuapp.bid',
'subject':'Welcome to %APP_NAME% ',
'message':'<p>Hello ,</p> <p>Follow this link to join in %APP_NAME% .</p> <p><a href=\'%LINK%\'>%LINK%</a></p> <p>If you didn't ask to join the application, you can ignore this email.</p> <p>Thanks,</p> <p>Your %APP_NAME% team</p>'
} };
var userConfig = { first_name: 'A', last_name: 'B', email_id: 'amelia.burrows@zylker.com' };
パスワードのリセット
これらのオブジェクトは registerUser() メソッドの引数として渡され、Promise が返されます。
返される Promise は JSON であるオブジェクトに解決されます。
copy
const userManagement = app.userManagement();
let users = await userManagement.resetPassword('amelia.b@zylker.com', {
'platform_type': 'web',
'redirect_url': 'https://www.google.com',
'template_details': {
'subject': 'Reset Password',
'message': 'Click on the link to reset your password: Reset Password',
'senders_mail': 'support@zylker.com'
}
});
console.log(users);
最終更新日 2026-03-30 13:40:30 +0530 IST
Yes
No
Send your feedback to us
Skip
Submit