當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript Accounts.forgotPassword方法代碼示例

本文整理匯總了TypeScript中meteor/accounts-base.Accounts.forgotPassword方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Accounts.forgotPassword方法的具體用法?TypeScript Accounts.forgotPassword怎麽用?TypeScript Accounts.forgotPassword使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在meteor/accounts-base.Accounts的用法示例。


在下文中一共展示了Accounts.forgotPassword方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: reset

 reset() {
   Accounts.forgotPassword(this.credentials, this.$bindToContext((err) => {
     if (err) {
       this.error = err;
     } else {
       this.$state.go('parties');
     }
   }));
 }
開發者ID:AyushAnandChouksey,項目名稱:meteor-angular-socially,代碼行數:9,代碼來源:password.ts

示例2: recover

 recover(credentials) {
   if (this.recoverForm.valid) {
     Accounts.forgotPassword({ email: credentials.email}, (err) => {
       if (err) {
         this.error = err;
       }
       else {
         this.router.navigate(['/']);
       }
     });
   }
 }
開發者ID:DavyDuDu,項目名稱:meteor-angular2.0-socially,代碼行數:12,代碼來源:recover.ts

示例3: recover

  recover() {
    this.resetErrors();

    Accounts.forgotPassword({email: this.credentials.email}, (error) => {
      if (error) {
        this.errors.push(error.reason || "Unknown error");
      }
      else {
        this.message = "You will receive further instruction to you email address!";
        this.isDropdownOpen = false;
        this._resetCredentialsFields();
      }
    });
  }
開發者ID:Anhmike,項目名稱:angular2-shop,代碼行數:14,代碼來源:login-buttons.ts

示例4: recover

 recover() {
   if (this.recoverForm.valid) {
     Accounts.forgotPassword({
       email: this.recoverForm.value.email
     }, (err) => {
       if (err) {
         this.zone.run(() => {
           this.error = err;
         });
       } else {
         this.router.navigate(['/']);
       }
     });
   }
 }
開發者ID:SiddheshKhedekar,項目名稱:meteor-angular2.0-socially,代碼行數:15,代碼來源:recover.component.ts

示例5: emailResetLink

    }
    return false;
  },

  emailResetLink ({__}: IContext, email: string, callback: Function) {
    clearMessages();

    if (isNotEmpty(email) && isEmail(email)) {

      Accounts.forgotPassword({email: email}, function(err: any) {
        callback();

        if (err) {
          if (err.message === "User not found [403]") {
            showError("accounts.error.emailNotFound");
          } else {
            showError("accounts.error.unknownError");
          }
        } else {
          showInfo("accounts.messages.passwordResetEmailSent");
        }
      });
    }
    return false;
  },

  resetPassword ({__, Session}: IContext, password: string, passwordConfirm: string, callback: Function): void {
    if (isNotEmpty(password) && areValidPasswords(password, passwordConfirm)) {
      const token = Session.get(TOKENKEY);

      Accounts.resetPassword(token, password, function(err: any) {
開發者ID:tomitrescak,項目名稱:meteor-accountsui-semanticui-react,代碼行數:31,代碼來源:accounts.ts


注:本文中的meteor/accounts-base.Accounts.forgotPassword方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。