Commit 75c6e468 authored by David Burke's avatar David Burke

Rename forgot password to reset password for consistency

parent 6c0c3161
Pipeline #36132564 passed with stage
in 7 minutes and 29 seconds
...@@ -24,7 +24,7 @@ import { UserService } from "./user"; ...@@ -24,7 +24,7 @@ import { UserService } from "./user";
import { Store } from "@ngrx/store"; import { Store } from "@ngrx/store";
import { IState } from "../app.reducers"; import { IState } from "../app.reducers";
import { HttpErrorResponse } from "@angular/common/http"; import { HttpErrorResponse } from "@angular/common/http";
import { SetPasswordActionTypes } from "./forgot-password/set-password/set-password.actions"; import { SetPasswordActionTypes } from "./reset-password/set-password/set-password.actions";
@Injectable() @Injectable()
export class LoginEffects { export class LoginEffects {
...@@ -60,15 +60,20 @@ export class LoginEffects { ...@@ -60,15 +60,20 @@ export class LoginEffects {
); );
@Effect({ dispatch: false }) @Effect({ dispatch: false })
loginSuccess$ = this.actions$.ofType(AccountActionTypes.LOGIN_SUCCESS, SetPasswordActionTypes.SET_PASSWORD_SUCCESS).pipe( loginSuccess$ = this.actions$
tap(() => { .ofType(
if (IS_EXTENSION) { AccountActionTypes.LOGIN_SUCCESS,
this.router.navigate(["/popup"]); SetPasswordActionTypes.SET_PASSWORD_SUCCESS
} else { )
this.router.navigate(["/list"]); .pipe(
} tap(() => {
}) if (IS_EXTENSION) {
); this.router.navigate(["/popup"]);
} else {
this.router.navigate(["/list"]);
}
})
);
@Effect({ dispatch: false }) @Effect({ dispatch: false })
loginRedirect$ = this.actions$ loginRedirect$ = this.actions$
......
...@@ -19,18 +19,18 @@ import * as fromRegister from "./register/register.reducer"; ...@@ -19,18 +19,18 @@ import * as fromRegister from "./register/register.reducer";
import * as fromChangePassword from "./change-password/change-password.reducer"; import * as fromChangePassword from "./change-password/change-password.reducer";
import * as fromDeleteAccount from "./delete/delete.reducer"; import * as fromDeleteAccount from "./delete/delete.reducer";
import * as fromErrorReporting from "./error-reporting/error-reporting.reducer"; import * as fromErrorReporting from "./error-reporting/error-reporting.reducer";
import * as fromForgotPassword from "./forgot-password/forgot-password.reducer"; import * as fromResetPassword from "./reset-password/reset-password.reducer";
import * as fromResetPasswordVerify from "./forgot-password/reset-password-verify/reset-password-verify.reducer"; import * as fromResetPasswordVerify from "./reset-password/reset-password-verify/reset-password-verify.reducer";
import * as fromSetPassword from "./forgot-password/set-password/set-password.reducer"; import * as fromSetPassword from "./reset-password/set-password/set-password.reducer";
import { import {
ResetPasswordVerifyActionTypes, ResetPasswordVerifyActionTypes,
ResetPasswordVerifyActionsUnion ResetPasswordVerifyActionsUnion
} from "./forgot-password/reset-password-verify/reset-password-verify.actions"; } from "./reset-password/reset-password-verify/reset-password-verify.actions";
import { import {
SetPasswordSuccess, SetPasswordSuccess,
SetPasswordActionTypes, SetPasswordActionTypes,
ForceSetPassword ForceSetPassword
} from "./forgot-password/set-password/set-password.actions"; } from "./reset-password/set-password/set-password.actions";
export interface IAuthState { export interface IAuthState {
email: string | null; email: string | null;
...@@ -125,7 +125,7 @@ export interface IAccountState { ...@@ -125,7 +125,7 @@ export interface IAccountState {
changePassword: fromChangePassword.IChangePasswordState; changePassword: fromChangePassword.IChangePasswordState;
deleteAccount: fromDeleteAccount.IDeleteAccountState; deleteAccount: fromDeleteAccount.IDeleteAccountState;
errorReporting: fromErrorReporting.IState; errorReporting: fromErrorReporting.IState;
forgotPassword: fromForgotPassword.IForgotPasswordState; resetPassword: fromResetPassword.IResetPasswordState;
resetPasswordVerify: fromResetPasswordVerify.IResetPasswordVerifyState; resetPasswordVerify: fromResetPasswordVerify.IResetPasswordVerifyState;
setPassword: fromSetPassword.ISetPasswordState; setPassword: fromSetPassword.ISetPasswordState;
} }
...@@ -138,7 +138,7 @@ export const reducers: ActionReducerMap<IAccountState> = { ...@@ -138,7 +138,7 @@ export const reducers: ActionReducerMap<IAccountState> = {
changePassword: fromChangePassword.reducer, changePassword: fromChangePassword.reducer,
deleteAccount: fromDeleteAccount.reducer, deleteAccount: fromDeleteAccount.reducer,
errorReporting: fromErrorReporting.reducer, errorReporting: fromErrorReporting.reducer,
forgotPassword: fromForgotPassword.reducer, resetPassword: fromResetPassword.reducer,
resetPasswordVerify: fromResetPasswordVerify.reducer, resetPasswordVerify: fromResetPasswordVerify.reducer,
setPassword: fromSetPassword.reducer setPassword: fromSetPassword.reducer
}; };
...@@ -324,25 +324,25 @@ export const getErrorReportingHasStarted = createSelector( ...@@ -324,25 +324,25 @@ export const getErrorReportingHasStarted = createSelector(
fromErrorReporting.getHasStarted fromErrorReporting.getHasStarted
); );
export const selectForgotPasswordState = createSelector( export const selectResetPasswordState = createSelector(
selectAccountState, selectAccountState,
(state: IAccountState) => state.forgotPassword (state: IAccountState) => state.resetPassword
); );
export const getForgotPasswordForm = createSelector( export const getResetPasswordForm = createSelector(
selectForgotPasswordState, selectResetPasswordState,
fromForgotPassword.getForm fromResetPassword.getForm
); );
export const getForgotPasswordHasStarted = createSelector( export const getResetPasswordHasStarted = createSelector(
selectForgotPasswordState, selectResetPasswordState,
fromForgotPassword.getHasStarted fromResetPassword.getHasStarted
); );
export const getForgotPasswordHasFinished = createSelector( export const getResetPasswordHasFinished = createSelector(
selectForgotPasswordState, selectResetPasswordState,
fromForgotPassword.getHasFinished fromResetPassword.getHasFinished
); );
export const getForgotPasswordErrorMessage = createSelector( export const getResetPasswordErrorMessage = createSelector(
selectForgotPasswordState, selectResetPasswordState,
fromForgotPassword.getErrorMessage fromResetPassword.getErrorMessage
); );
export const selectResetPasswordVerifyState = createSelector( export const selectResetPasswordVerifyState = createSelector(
......
...@@ -33,17 +33,17 @@ import { ErrorReportingComponent } from "./error-reporting/error-reporting.compo ...@@ -33,17 +33,17 @@ import { ErrorReportingComponent } from "./error-reporting/error-reporting.compo
import { ErrorReportingContainer } from "./error-reporting/error-reporting.container"; import { ErrorReportingContainer } from "./error-reporting/error-reporting.container";
import { ErrorReportingEffects } from "./error-reporting/error-reporting.effects"; import { ErrorReportingEffects } from "./error-reporting/error-reporting.effects";
import { BackupCodeComponent } from "./backup-code/backup-code.component"; import { BackupCodeComponent } from "./backup-code/backup-code.component";
import { ForgotPasswordComponent } from "./forgot-password/forgot-password.component"; import { ResetPasswordComponent } from "./reset-password/reset-password.component";
import { MarketingFrameComponent } from "./marketing-frame/marketing-frame.component"; import { MarketingFrameComponent } from "./marketing-frame/marketing-frame.component";
import { ForgotPasswordContainer } from "./forgot-password/forgot-password.container"; import { ResetPasswordContainer } from "./reset-password/reset-password.container";
import { ForgotPasswordEffects } from "./forgot-password/forgot-password.effects"; import { ResetPasswordEffects } from "./reset-password/reset-password.effects";
import { ResetPasswordVerifyComponent } from "./forgot-password/reset-password-verify/reset-password-verify.component"; import { ResetPasswordVerifyComponent } from "./reset-password/reset-password-verify/reset-password-verify.component";
import { ResetPasswordVerifyContainer } from "./forgot-password/reset-password-verify/reset-password-verify.container"; import { ResetPasswordVerifyContainer } from "./reset-password/reset-password-verify/reset-password-verify.container";
import { ResetPasswordVerifyEffects } from "./forgot-password/reset-password-verify/reset-password-verify.effects"; import { ResetPasswordVerifyEffects } from "./reset-password/reset-password-verify/reset-password-verify.effects";
import { PasswordInputComponent } from "./change-password/password-input/password-input.component"; import { PasswordInputComponent } from "./change-password/password-input/password-input.component";
import { SetPasswordComponent } from "./forgot-password/set-password/set-password.component"; import { SetPasswordComponent } from "./reset-password/set-password/set-password.component";
import { SetPasswordContainer } from "./forgot-password/set-password/set-password.container"; import { SetPasswordContainer } from "./reset-password/set-password/set-password.container";
import { SetPasswordEffects } from "./forgot-password/set-password/set-password.effects"; import { SetPasswordEffects } from "./reset-password/set-password/set-password.effects";
export const COMPONENTS = [ export const COMPONENTS = [
AccountComponent, AccountComponent,
...@@ -61,8 +61,8 @@ export const COMPONENTS = [ ...@@ -61,8 +61,8 @@ export const COMPONENTS = [
RegisterComponent, RegisterComponent,
RegisterContainer, RegisterContainer,
BackupCodeComponent, BackupCodeComponent,
ForgotPasswordComponent, ResetPasswordComponent,
ForgotPasswordContainer, ResetPasswordContainer,
ResetPasswordVerifyComponent, ResetPasswordVerifyComponent,
ResetPasswordVerifyContainer, ResetPasswordVerifyContainer,
SetPasswordComponent, SetPasswordComponent,
...@@ -89,7 +89,7 @@ export const SERVICES = [UserService, ConfirmEmailGuard]; ...@@ -89,7 +89,7 @@ export const SERVICES = [UserService, ConfirmEmailGuard];
RegisterEffects, RegisterEffects,
ConfirmEmailEffects, ConfirmEmailEffects,
ErrorReportingEffects, ErrorReportingEffects,
ForgotPasswordEffects, ResetPasswordEffects,
ResetPasswordVerifyEffects, ResetPasswordVerifyEffects,
SetPasswordEffects SetPasswordEffects
]) ])
......
...@@ -23,7 +23,6 @@ import { BACKUP_CODE_CHARS, BACKUP_CODE_LENGTH } from "../constants"; ...@@ -23,7 +23,6 @@ import { BACKUP_CODE_CHARS, BACKUP_CODE_LENGTH } from "../constants";
export class ResetPasswordVerifyContainer implements OnInit { export class ResetPasswordVerifyContainer implements OnInit {
form$ = this.store.select(fromAccount.getResetPasswordVerifyForm); form$ = this.store.select(fromAccount.getResetPasswordVerifyForm);
hasStarted$ = this.store.select(fromAccount.getResetPasswordVerifyHasStarted); hasStarted$ = this.store.select(fromAccount.getResetPasswordVerifyHasStarted);
// hasFinished$ = this.store.select(fromAccount.getForgotPasswordHasFinished);
errorMessage$ = this.store.select( errorMessage$ = this.store.select(
fromAccount.getResetPasswordVerifyErrorMessage fromAccount.getResetPasswordVerifyErrorMessage
); );
......
...@@ -12,7 +12,7 @@ import { ...@@ -12,7 +12,7 @@ import {
ResetPasswordVerifyActionsUnion ResetPasswordVerifyActionsUnion
} from "./reset-password-verify.actions"; } from "./reset-password-verify.actions";
const FORM_ID = "Forgot Password Form"; const FORM_ID = "Reset Password Form";
export interface IResetPasswordVerifyForm { export interface IResetPasswordVerifyForm {
code: string; code: string;
......
import { Action } from "@ngrx/store"; import { Action } from "@ngrx/store";
export enum ForgotPasswordActionTypes { export enum ResetPasswordActionTypes {
SUBMIT_FORM = "[Forgot Password] Submit", SUBMIT_FORM = "[Reset Password] Submit",
SUBMIT_FORM_SUCCESS = "[Forgot Password] Submit Success", SUBMIT_FORM_SUCCESS = "[Reset Password] Submit Success",
SUBMIT_FORM_FAILURE = "[Forgot Password] Submit Failure", SUBMIT_FORM_FAILURE = "[Reset Password] Submit Failure",
RESET_FORM = "[Forgot Password] Reset" RESET_FORM = "[Reset Password] Reset"
} }
export class SubmitForm implements Action { export class SubmitForm implements Action {
readonly type = ForgotPasswordActionTypes.SUBMIT_FORM; readonly type = ResetPasswordActionTypes.SUBMIT_FORM;
} }
export class SubmitFormSuccess implements Action { export class SubmitFormSuccess implements Action {
readonly type = ForgotPasswordActionTypes.SUBMIT_FORM_SUCCESS; readonly type = ResetPasswordActionTypes.SUBMIT_FORM_SUCCESS;
} }
export class SubmitFormFailure implements Action { export class SubmitFormFailure implements Action {
readonly type = ForgotPasswordActionTypes.SUBMIT_FORM_FAILURE; readonly type = ResetPasswordActionTypes.SUBMIT_FORM_FAILURE;
} }
export class ResetForm implements Action { export class ResetForm implements Action {
readonly type = ForgotPasswordActionTypes.RESET_FORM; readonly type = ResetPasswordActionTypes.RESET_FORM;
} }
export type ForgotPasswordActionsUnion = export type ResetPasswordActionsUnion =
| SubmitForm | SubmitForm
| SubmitFormSuccess | SubmitFormSuccess
| SubmitFormFailure | SubmitFormFailure
......
...@@ -6,25 +6,24 @@ import { ...@@ -6,25 +6,24 @@ import {
EventEmitter, EventEmitter,
ViewChild, ViewChild,
ElementRef, ElementRef,
OnInit, OnInit
} from "@angular/core"; } from "@angular/core";
import { FormGroupState } from "ngrx-forms"; import { FormGroupState } from "ngrx-forms";
import { IForgotPasswordForm } from "./forgot-password.reducer"; import { IResetPasswordForm } from "./reset-password.reducer";
@Component({ @Component({
selector: "app-forgot-password", selector: "app-reset-password",
templateUrl: "./forgot-password.component.html", templateUrl: "./reset-password.component.html",
styleUrls: ["../account.component.scss", "./forgot-password.styles.scss"], styleUrls: ["../account.component.scss", "./reset-password.styles.scss"],
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ForgotPasswordComponent implements OnInit { export class ResetPasswordComponent implements OnInit {
@Input() @Input()
isExtension: boolean; isExtension: boolean;
@Input() @Input()
form: FormGroupState<IForgotPasswordForm>; form: FormGroupState<IResetPasswordForm>;
@Input() @Input()
errorMessage: string; errorMessage: string;
@Input() @Input()
...@@ -55,6 +54,6 @@ export class ForgotPasswordComponent implements OnInit { ...@@ -55,6 +54,6 @@ export class ForgotPasswordComponent implements OnInit {
onReset() { onReset() {
this.reset.emit(); this.reset.emit();
setTimeout(() => (this.emailInput.nativeElement.focus()), 0); setTimeout(() => this.emailInput.nativeElement.focus(), 0);
} }
} }
import { Component, ChangeDetectionStrategy } from "@angular/core"; import { Component, ChangeDetectionStrategy } from "@angular/core";
import * as fromAccount from "../account.reducer"; import * as fromAccount from "../account.reducer";
import { Store } from "@ngrx/store"; import { Store } from "@ngrx/store";
import { SubmitForm, ResetForm } from "./forgot-password.actions"; import { SubmitForm, ResetForm } from "./reset-password.actions";
import { IS_EXTENSION } from "../../constants"; import { IS_EXTENSION } from "../../constants";
@Component({ @Component({
template: ` template: `
<app-forgot-password <app-reset-password
[form]="form$ | async" [form]="form$ | async"
[isExtension]="isExtension" [isExtension]="isExtension"
[hasStarted]="hasStarted$ | async" [hasStarted]="hasStarted$ | async"
...@@ -14,15 +14,15 @@ import { IS_EXTENSION } from "../../constants"; ...@@ -14,15 +14,15 @@ import { IS_EXTENSION } from "../../constants";
[errorMessage]="errorMessage$ | async" [errorMessage]="errorMessage$ | async"
(submitEmail)="submitEmail()" (submitEmail)="submitEmail()"
(reset)="reset()" (reset)="reset()"
></app-forgot-password> ></app-reset-password>
`, `,
changeDetection: ChangeDetectionStrategy.OnPush changeDetection: ChangeDetectionStrategy.OnPush
}) })
export class ForgotPasswordContainer { export class ResetPasswordContainer {
form$ = this.store.select(fromAccount.getForgotPasswordForm); form$ = this.store.select(fromAccount.getResetPasswordForm);
hasStarted$ = this.store.select(fromAccount.getForgotPasswordHasStarted); hasStarted$ = this.store.select(fromAccount.getResetPasswordHasStarted);
hasFinished$ = this.store.select(fromAccount.getForgotPasswordHasFinished); hasFinished$ = this.store.select(fromAccount.getResetPasswordHasFinished);
errorMessage$ = this.store.select(fromAccount.getForgotPasswordErrorMessage); errorMessage$ = this.store.select(fromAccount.getResetPasswordErrorMessage);
isExtension = IS_EXTENSION; isExtension = IS_EXTENSION;
constructor(private store: Store<fromAccount.IAuthState>) {} constructor(private store: Store<fromAccount.IAuthState>) {}
......
...@@ -2,28 +2,28 @@ import { Injectable } from "@angular/core"; ...@@ -2,28 +2,28 @@ import { Injectable } from "@angular/core";
import { Effect, Actions } from "@ngrx/effects"; import { Effect, Actions } from "@ngrx/effects";
import { import {
SubmitForm, SubmitForm,
ForgotPasswordActionTypes, ResetPasswordActionTypes,
SubmitFormSuccess, SubmitFormSuccess,
SubmitFormFailure SubmitFormFailure
} from "./forgot-password.actions"; } from "./reset-password.actions";
import { withLatestFrom, map, exhaustMap, catchError } from "rxjs/operators"; import { withLatestFrom, map, exhaustMap, catchError } from "rxjs/operators";
import { Store } from "@ngrx/store"; import { Store } from "@ngrx/store";
import { IState } from "../../app.reducers"; import { IState } from "../../app.reducers";
import { getForgotPasswordForm } from "../account.reducer"; import { getResetPasswordForm } from "../account.reducer";
import { UserService } from "../user"; import { UserService } from "../user";
import { of } from "rxjs"; import { of } from "rxjs";
@Injectable() @Injectable()
export class ForgotPasswordEffects { export class ResetPasswordEffects {
@Effect() @Effect()
submitForm$ = this.actions$ submitForm$ = this.actions$
.ofType<SubmitForm>(ForgotPasswordActionTypes.SUBMIT_FORM) .ofType<SubmitForm>(ResetPasswordActionTypes.SUBMIT_FORM)
.pipe( .pipe(
withLatestFrom(this.store.select(getForgotPasswordForm)), withLatestFrom(this.store.select(getResetPasswordForm)),
map(([action, form]) => form.value), map(([action, form]) => form.value),
exhaustMap(form => { exhaustMap(form => {
const callForgotPassword = () => { const callForgotPassword = () => {
return this.userService.forgotPassword(form.email).pipe( return this.userService.resetPassword(form.email).pipe(
map(() => new SubmitFormSuccess()), map(() => new SubmitFormSuccess()),
catchError(err => of(new SubmitFormFailure())) catchError(err => of(new SubmitFormFailure()))
); );
......
...@@ -9,68 +9,68 @@ import { required, pattern } from "ngrx-forms/validation"; ...@@ -9,68 +9,68 @@ import { required, pattern } from "ngrx-forms/validation";
import { IBaseFormState } from "../../utils/interfaces"; import { IBaseFormState } from "../../utils/interfaces";
import { import {
ForgotPasswordActionsUnion, ResetPasswordActionsUnion,
ForgotPasswordActionTypes ResetPasswordActionTypes
} from "./forgot-password.actions"; } from "./reset-password.actions";
const FORM_ID = "Forgot Password Form"; const FORM_ID = "Reset Password Form";
export interface IForgotPasswordForm { export interface IResetPasswordForm {
email: string; email: string;
showUrl: boolean; showUrl: boolean;
url: string; url: string;
} }
const validateAndUpdateFormState = updateGroup<IForgotPasswordForm>({ const validateAndUpdateFormState = updateGroup<IResetPasswordForm>({
email: validate(required, pattern(/^[^\s@][email protected][^\s@]+\.[^\s@]{2,}$/)) email: validate(required, pattern(/^[^\s@][email protected][^\s@]+\.[^\s@]{2,}$/))
}); });
export const initialFormState = validateAndUpdateFormState( export const initialFormState = validateAndUpdateFormState(
createFormGroupState<IForgotPasswordForm>(FORM_ID, { createFormGroupState<IResetPasswordForm>(FORM_ID, {
email: "", email: "",
showUrl: false, showUrl: false,
url: "" url: ""
}) })
); );
export interface IForgotPasswordState extends IBaseFormState { export interface IResetPasswordState extends IBaseFormState {
form: FormGroupState<IForgotPasswordForm>; form: FormGroupState<IResetPasswordForm>;
errorMessage: string | null; errorMessage: string | null;
} }
const initialState: IForgotPasswordState = { const initialState: IResetPasswordState = {
form: initialFormState, form: initialFormState,
hasStarted: false, hasStarted: false,
hasFinished: false, hasFinished: false,
errorMessage: null errorMessage: null
}; };
export const formReducer = createFormStateReducerWithUpdate< export const formReducer = createFormStateReducerWithUpdate<IResetPasswordForm>(
IForgotPasswordForm validateAndUpdateFormState
>(validateAndUpdateFormState); );
export function reducer( export function reducer(
state = initialState, state = initialState,
action: ForgotPasswordActionsUnion action: ResetPasswordActionsUnion
): IForgotPasswordState { ): IResetPasswordState {
const form = formReducer(state.form, action); const form = formReducer(state.form, action);
state = { ...state, form }; state = { ...state, form };
switch (action.type) { switch (action.type) {
case ForgotPasswordActionTypes.SUBMIT_FORM: case ResetPasswordActionTypes.SUBMIT_FORM:
return { return {
...state, ...state,
hasStarted: true, hasStarted: true,
hasFinished: false hasFinished: false
}; };
case ForgotPasswordActionTypes.SUBMIT_FORM_SUCCESS: case ResetPasswordActionTypes.SUBMIT_FORM_SUCCESS:
return { return {
...state, ...state,
hasFinished: true hasFinished: true
}; };
case ForgotPasswordActionTypes.SUBMIT_FORM_FAILURE: case ResetPasswordActionTypes.SUBMIT_FORM_FAILURE:
return { return {
...state, ...state,
errorMessage: "An error occured", errorMessage: "An error occured",
...@@ -78,16 +78,15 @@ export function reducer( ...@@ -78,16 +78,15 @@ export function reducer(
hasStarted: false hasStarted: false
}; };
case ForgotPasswordActionTypes.RESET_FORM: case ResetPasswordActionTypes.RESET_FORM:
return initialState; return initialState;
} }
return state; return state;
} }
export const getForm = (state: IForgotPasswordState) => state.form; export const getForm = (state: IResetPasswordState) => state.form;
export const getErrorMessage = (state: IForgotPasswordState) => export const getErrorMessage = (state: IResetPasswordState) =>
state.errorMessage; state.errorMessage;
export const getHasStarted = (state: IForgotPasswordState) => state.hasStarted; export const getHasStarted = (state: IResetPasswordState) => state.hasStarted;
export const getHasFinished = (state: IForgotPasswordState) => export const getHasFinished = (state: IResetPasswordState) => state.hasFinished;
state.hasFinished;
...@@ -213,7 +213,7 @@ export class UserService { ...@@ -213,7 +213,7 @@ export class UserService {
}); });
} }
public forgotPassword(email: string) { public resetPassword(email: string) {
const url = this.sdk.formUrl("reset-password/"); const url = this.sdk.formUrl("reset-password/");
const data = { const data = {
email email
...@@ -320,7 +320,11 @@ export class UserService { ...@@ -320,7 +320,11 @@ export class UserService {
/** Final step of reset password process, set new password. /** Final step of reset password process, set new password.
* Unlike change password, this doesn't require the old password. * Unlike change password, this doesn't require the old password.
*/ */
resetPasswordSetPassword(emailCode: string, newPassword: string, backupCode: string) { resetPasswordSetPassword(
emailCode: string,
newPassword: string,
backupCode: string
) {
const newUserKeyPair = KeyPair.generate(); const newUserKeyPair = KeyPair.generate();
const { hash, salt } = hashPassword(newPassword); const { hash, salt } = hashPassword(newPassword);
......
...@@ -20,9 +20,9 @@ import { NoContentContainer } from "./no-content"; ...@@ -20,9 +20,9 @@ import { NoContentContainer } from "./no-content";
import { PopupLoggedInGuard } from "./guards/popup-logged-in.guard"; import { PopupLoggedInGuard } from "./guards/popup-logged-in.guard";
import { ConfirmEmailGuard } from "./account/confirm-email/confirm-email.guard"; import { ConfirmEmailGuard } from "./account/confirm-email/confirm-email.guard";
import { ErrorReportingContainer } from "./account/error-reporting/error-reporting.container"; import { ErrorReportingContainer } from "./account/error-reporting/error-reporting.container";
import { ForgotPasswordContainer } from "./account/forgot-password/forgot-password.container"; import { ResetPasswordContainer } from "./account/reset-password/reset-password.container";
import { ResetPasswordVerifyContainer } from "./account/forgot-password/reset-password-verify/reset-password-verify.container"; import { ResetPasswordVerifyContainer } from "./account/reset-password/reset-password-verify/reset-password-verify.container";
import { SetPasswordContainer } from "./account/forgot-password/set-password/set-password.container"; import { SetPasswordContainer } from "./account/reset-password/set-password/set-password.container";
/* tslint:disable:object-literal-sort-keys */ /* tslint:disable:object-literal-sort-keys */
const appRoutes: Routes = [ const appRoutes: Routes = [
...@@ -93,7 +93,7 @@ const appRoutes: Routes = [ ...@@ -93,7 +93,7 @@ const appRoutes: Routes = [
}, },
{