lib/model/instance/user.js
// a session for that actor. Returns Promise[String] of that token.
a session for that actor. Returns Promise[String] of that token.
a session for that actor . Returns Promise [ String ] of that token .
provisionPasswordResetToken() {
    const expiresAt = new Date();
    expiresAt.setDate(expiresAt.getDate() + 1);
    const displayName = `Reset token for ${this.actor.id}`;
    const meta = { resetPassword: this.actor.id };
    return (new Actor({ type: Actor.types().singleUse, expiresAt, displayName, meta }))
      .create()
      .then((actor) => Promise.all([
        actor.assignSystemRole('pwreset', this.actor),
        Session.fromActor(actor).create()
      ]))
      .then(([ , session ]) => session.token);
  }
provisionPasswordResetToken ( ) { const expiresAt = new Date ( ) ; expiresAt . setDate ( expiresAt . getDate ( ) + 1 ) ; const displayName = ` ${ this . actor . id } ` ; const meta = { resetPassword : this . actor . id } ; return ( new Actor ( { type : Actor . types ( ) . singleUse , expiresAt , displayName , meta } ) ) . create ( ) . then ( ( actor ) => Promise . all ( [ actor . assignSystemRole ( 'pwreset' , this . actor ) , Session . fromActor ( actor ) . create ( ) ] ) ) . then ( ( [ , session ] ) => session . token ) ; }
a session for that actor.
a session for that actor .