Socket
Socket
Sign inDemoInstall

fulton-server

Package Overview
Dependencies
346
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.23 to 0.0.24-0

4

identity/fulton-impl/fulton-impl.js

@@ -240,5 +240,5 @@ "use strict";

.forgotPassword(username || email, helper_1.Helper.urlResolve(req, options.path))
.then(() => {
.then((result) => {
res.send({
status: 200
data: result
});

@@ -245,0 +245,0 @@ }).catch(next);

@@ -1,2 +0,2 @@

import { AccessToken, IFultonUser, IOauthProfile, IUserService, RegisterModel } from '../interfaces';
import { AccessToken, IFultonUser, IOauthProfile, IUserService, RegisterModel, ForgotPasswordModel } from '../interfaces';
import { FultonUser } from './fulton-user';

@@ -15,3 +15,3 @@ import { IFultonApp } from '../../fulton-app';

issueAccessToken(user: IFultonUser): Promise<AccessToken>;
forgotPassword(usernameOrEmail: string, baseUrl: string): Promise<any>;
forgotPassword(usernameOrEmail: string, baseUrl: string): Promise<ForgotPasswordModel>;
resetPassword(token: string, code: string, password: string): Promise<void>;

@@ -18,0 +18,0 @@ verifyResetPassword(token: string, code: string): Promise<void>;

@@ -356,3 +356,4 @@ "use strict";

let code = identity.resetPasswordCode = crypto_helper_1.numberCodeGenerate();
identity.resetPasswordExpiredAt = new Date(Date.now() + (this.options.forgotPassword.duration * 1000));
let expire_in = this.options.forgotPassword.duration * 1000;
identity.resetPasswordExpiredAt = new Date(expire_in);
yield this.runner.updateIdentity(identity);

@@ -367,2 +368,6 @@ let user = yield this.runner.findUserById(identity.userId);

});
return {
token: token,
expire_in: expire_in
};
}

@@ -369,0 +374,0 @@ else {

@@ -43,3 +43,3 @@ /// <reference types="passport" />

issueAccessToken(user: T): Promise<AccessToken>;
forgotPassword(usernameOrEmail: string, baseUrl: string): Promise<void>;
forgotPassword(usernameOrEmail: string, baseUrl: string): Promise<ForgotPasswordModel>;
resetPassword(token: string, code: string, password: string): Promise<void>;

@@ -86,2 +86,6 @@ verifyResetPassword(token: string, code: string): Promise<void>;

}
export interface ForgotPasswordModel {
token: string;
expire_in: number;
}
export interface WelcomeNotificationModel {

@@ -88,0 +92,0 @@ username: string;

{
"name": "fulton-server",
"version": "0.0.23",
"version": "0.0.24-0",
"description": "Fulton is the best practical way to build web apis or websites we have done in our company. Basically, Fulton is integrated many popular libraries or frameworks seamlessly. By use Fulton, developers can build a completed web api or a websites quickly.",

@@ -5,0 +5,0 @@ "main": "./main.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc