mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
* [refactor(Account Switching)] Implement StateService * [bug] Migration service updates * [bug] Fix organizationId coming in as null * [bug] Use correct storage location * [bug] Fix secure storage issues * [bug] Small fixes * [bug] lint fixes * [bug] Undo comment * [bug] Make method names match super * update jslib * Add index signature to keys * Run prettier * Start dbus * Start dbus a different way * Update build.yml * Add eval * Init keyring as well * Remove eval * Add eval's back * Remove unused import * Remove unnecessary null checks * Change userId to be entityId instead of clientId * Remove config service * lint fixes * Add clientKeys to account Co-authored-by: Robyn MacCallum <robyntmaccallum@gmail.com>
20 lines
524 B
TypeScript
20 lines
524 B
TypeScript
import { Injectable } from "@angular/core";
|
|
import { CanActivate, Router } from "@angular/router";
|
|
|
|
import { StateService } from "../../abstractions/state.service";
|
|
|
|
@Injectable()
|
|
export class LaunchGuardService implements CanActivate {
|
|
constructor(private stateService: StateService, private router: Router) {}
|
|
|
|
async canActivate() {
|
|
const isAuthed = await this.stateService.getIsAuthenticated();
|
|
if (!isAuthed) {
|
|
return true;
|
|
}
|
|
|
|
this.router.navigate(["/tabs/dashboard"]);
|
|
return false;
|
|
}
|
|
}
|