Commit 129a2327 authored by David Burke's avatar David Burke

Slightly better redirect logic for web ext

parent d1c9ae94
Pipeline #64315440 passed with stages
in 12 minutes and 57 seconds
......@@ -17,6 +17,7 @@ import { IState, selectVerifyMfaForm } from "../login.reducer";
import { UserService } from "../../account/user";
import { of } from "rxjs";
import { Router } from "@angular/router";
import { IS_EXTENSION } from "../../constants";
@Injectable()
export class VerifyMFAEffects {
......@@ -39,7 +40,13 @@ export class VerifyMFAEffects {
@Effect({ dispatch: false })
verifyMfaSuccess$ = this.actions$.pipe(
ofType(VerifyMfaActionTypes.VERIFY_MFA_SUCCESS),
tap(() => this.router.navigate(["/"]))
tap(() => {
if (IS_EXTENSION) {
this.router.navigate(["/popup"]);
} else {
this.router.navigate(["/"]);
}
})
);
constructor(
......
......@@ -121,14 +121,15 @@ storiesOf("Account", module)
}))
.add("Manage Backup Code", () => {
const backupCodeToPdf = new BackupCodePdfService();
const code = "CBVDCH4G23MJ46FXJBR8GDX4WKBF97VR";
return {
component: ManageBackupCodeComponent,
props: {
form: fromChangePassword.initialState.form,
hasStarted: boolean("hasStarted", false),
hasFinished: boolean("hasFinished", false),
code: "CBVDCH4G23MJ46FXJBR8GDX4WKBF97VR",
downloadPDF: () => backupCodeToPdf.download(this.code)
code,
downloadPDF: () => backupCodeToPdf.download(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