1

私はまだ独自のユーザー ログイン/登録システムに取り組んでいます (アカウント パスワード パッケージを使用しています)。私は栄光に近すぎます;)、しかし私のシステムはパスワードのリセットフォームでクラッシュしています...

問題を解決するために何時間も投資しましたが、現時点では解決策がありません...ルーティングにはiron:routeパッケージを使用し、ユーザーの管理にはアカウントパスワードを使用しています。

問題は次の問題です。

reset-password ルートへのリンクが記載された電子メールを受信すると、ページが空白です...フォーム/テンプレートが表示されません... reset-password ルート/テンプレートの設定に問題がある可能性があると思いますが、よくわかりません... 何か提案をお願いします?? 私は Meteor から始めており、このログイン システムは私の最初の課題です... システムの完成に非常に近づいていますが、この問題は私を悩ませています... これは私のサイトの写真です (からのリセット リンクをたどります)受信した電子メール)...URL がパスワードのリセット トークンを正しく取得しているようですが、機能していないようです...コンソールにエラーは発生しません...よろしくお願いします。すべての提案を歓迎し![ここに画像の説明を入力ます] 1

これは私のコードです

クライアントjs

//config reset password
if (Accounts._resetPasswordToken) {
  Session.set('resetPasswordToken', Accounts._resetPasswordToken);
}
//Router reset password

  Router.route('/reset-password/:token', function () {
    this.layout('ResetLayout');

    this.render('ResetPassword', {
    to:"ResetPassword"
    });
});

Template.ResetPassword.helpers({
 resetPassword: function(){
    return Session.get('resetPasswordToken');
    console.log('resetPasswordToken');
  }
});

サーバーjs

Meteor.startup(function () {

  Accounts.urls.resetPassword = function(token) {
    return Meteor.absoluteUrl('reset-password/' + token);
  };

});

HTML

<template name="ResetLayout">
    <div class="container">     
      {{> yield "ResetPassword"}}
    </div> 
</template>


<template name="ResetPassword">
    {{#if resetPassword}}
        <div  id="resetPassword">
            <form  class="resetPasswordForm" method="post">
                <input id="resetPasswordPassword" name="password" placeholder="New Password" type="password" >
                <input id="resetPasswordPasswordConfirm" name="password-confirm" placeholder="Confirm" type="password" >
                <input class="btn-submit" type="submit" value="Reset">
            </form>
            <!-- end #reset-password-form -->
        </div>    
    {{/if}}
</template>
4

0 に答える 0