mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-09 05:57:40 +02:00
e29025df28
* use deep linked url for org invite instead of separate state * remove organization invite state & fix tests * clear login redirect for SSO JIT users since they are accepted when setting MP * create accept org invite service and consolidate components in module * finish switch to accept org invite service * move logic to accept org service * the rest of the owl * clear org invite along with deep linked route * pr feedback * fix test and add error to catch null invite * pr feedback * clear stored invite if it doesn't match provided one
25 lines
949 B
TypeScript
25 lines
949 B
TypeScript
import { Component, inject } from "@angular/core";
|
|
|
|
import { UpdatePasswordComponent as BaseUpdatePasswordComponent } from "@bitwarden/angular/auth/components/update-password.component";
|
|
|
|
import { RouterService } from "../core";
|
|
|
|
import { AcceptOrganizationInviteService } from "./organization-invite/accept-organization.service";
|
|
|
|
@Component({
|
|
selector: "app-update-password",
|
|
templateUrl: "update-password.component.html",
|
|
})
|
|
export class UpdatePasswordComponent extends BaseUpdatePasswordComponent {
|
|
private routerService = inject(RouterService);
|
|
private acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);
|
|
|
|
override async cancel() {
|
|
// clearing the login redirect url so that the user
|
|
// does not join the organization if they cancel
|
|
await this.routerService.getAndClearLoginRedirectUrl();
|
|
await this.acceptOrganizationInviteService.clearOrganizationInvitation();
|
|
await super.cancel();
|
|
}
|
|
}
|