mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
implement web onInit
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
import { inject } from "@angular/core";
|
||||
import { UrlTree } from "@angular/router";
|
||||
|
||||
import { DefaultLoginService, LoginService } from "@bitwarden/auth/angular";
|
||||
|
||||
export class WebLoginService extends DefaultLoginService implements LoginService {}
|
||||
import { RouterService } from "../../../../core/router.service";
|
||||
|
||||
export class WebLoginService extends DefaultLoginService implements LoginService {
|
||||
routerService = inject(RouterService);
|
||||
|
||||
setPreviousUrl(route: UrlTree): void | null {
|
||||
this.routerService.setPreviousUrl(route.toString());
|
||||
}
|
||||
|
||||
async handleExistingOrgInvite(): Promise<void | null> {
|
||||
const orgInvite = await this.acceptOrganizationInviteService.getOrganizationInvite();
|
||||
if (orgInvite != null) {
|
||||
await this.initPasswordPolicies(orgInvite);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,6 +127,7 @@ export class LoginComponent extends BaseLoginComponent implements OnInit {
|
||||
});
|
||||
this.routerService.setPreviousUrl(route.toString());
|
||||
}
|
||||
|
||||
await super.ngOnInit();
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user