Commit 4c7289d1 authored by Emily Jensen's avatar Emily Jensen

Document erros and clean up

parent a8928beb
Pipeline #38083171 passed with stage
in 9 minutes and 18 seconds
import { Component, OnInit } from "@angular/core";
import * as fromAccount from "../../account.reducer";
import { Store, select } from "@ngrx/store";
import {
Init,
VerifyAndLogin
} from "./reset-password-verify.actions";
import { Init, VerifyAndLogin } from "./reset-password-verify.actions";
import { ActivatedRoute } from "@angular/router";
import { BACKUP_CODE_CHARS, BACKUP_CODE_LENGTH } from "../constants";
......@@ -17,7 +14,7 @@ import { BACKUP_CODE_CHARS, BACKUP_CODE_LENGTH } from "../constants";
[badCodeError]="badCodeError"
(verify)="verify($event)"
></app-reset-password-verify>
`,
`
})
export class ResetPasswordVerifyContainer implements OnInit {
form$ = this.store.pipe(select(fromAccount.getResetPasswordVerifyForm));
......@@ -50,9 +47,9 @@ export class ResetPasswordVerifyContainer implements OnInit {
) {
this.store.dispatch(new VerifyAndLogin(backupCode));
} else {
// This error is for qr codes that are read by the scanner, but are not from Passit.
// If it is a Passit code, but the wrong one, it will error in state.
this.badCodeError = "Invalid backup code.";
// This error is for coedes that don't match the 32 letter and spacing requirements.
// If it is a Passit code, but the wrong one, it will error in in effects.
this.badCodeError = "Passit does not recognize this backup code.";
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment