mirror of
https://github.com/bitwarden/browser.git
synced 2025-01-24 21:41:33 +01:00
setup web-login.service.ts
This commit is contained in:
parent
2b90cbb3e5
commit
d4213fba2e
@ -1,3 +1,4 @@
|
||||
export * from "./login";
|
||||
export * from "./webauthn-login";
|
||||
export * from "./set-password-jit";
|
||||
export * from "./registration";
|
||||
|
1
apps/web/src/app/auth/core/services/login/index.ts
Normal file
1
apps/web/src/app/auth/core/services/login/index.ts
Normal file
@ -0,0 +1 @@
|
||||
export * from "./web-login.service";
|
@ -0,0 +1,3 @@
|
||||
import { DefaultLoginService, LoginService } from "@bitwarden/auth/angular";
|
||||
|
||||
export class WebLoginService extends DefaultLoginService implements LoginService {}
|
@ -20,6 +20,7 @@ import { ModalService as ModalServiceAbstraction } from "@bitwarden/angular/serv
|
||||
import {
|
||||
SetPasswordJitService,
|
||||
RegistrationFinishService as RegistrationFinishServiceAbstraction,
|
||||
LoginService,
|
||||
} from "@bitwarden/auth/angular";
|
||||
import { InternalUserDecryptionOptionsServiceAbstraction } from "@bitwarden/auth/common";
|
||||
import { ApiService } from "@bitwarden/common/abstractions/api.service";
|
||||
@ -57,7 +58,7 @@ import {
|
||||
import { VaultTimeout, VaultTimeoutStringType } from "@bitwarden/common/types/vault-timeout.type";
|
||||
|
||||
import { PolicyListService } from "../admin-console/core/policy-list.service";
|
||||
import { WebSetPasswordJitService, WebRegistrationFinishService } from "../auth";
|
||||
import { WebSetPasswordJitService, WebRegistrationFinishService, WebLoginService } from "../auth";
|
||||
import { AcceptOrganizationInviteService } from "../auth/organization-invite/accept-organization.service";
|
||||
import { HtmlStorageService } from "../core/html-storage.service";
|
||||
import { I18nService } from "../core/i18n.service";
|
||||
@ -200,6 +201,11 @@ const safeProviders: SafeProvider[] = [
|
||||
InternalUserDecryptionOptionsServiceAbstraction,
|
||||
],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: LoginService,
|
||||
useClass: WebLoginService,
|
||||
deps: [],
|
||||
}),
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@ -8,6 +8,8 @@ import {
|
||||
DefaultRegistrationFinishService,
|
||||
AnonLayoutWrapperDataService,
|
||||
DefaultAnonLayoutWrapperDataService,
|
||||
LoginService,
|
||||
DefaultLoginService,
|
||||
} from "@bitwarden/auth/angular";
|
||||
import {
|
||||
AuthRequestServiceAbstraction,
|
||||
@ -1290,6 +1292,11 @@ const safeProviders: SafeProvider[] = [
|
||||
useClass: DefaultRegistrationFinishService,
|
||||
deps: [CryptoServiceAbstraction, AccountApiServiceAbstraction],
|
||||
}),
|
||||
safeProvider({
|
||||
provide: LoginService,
|
||||
useClass: DefaultLoginService,
|
||||
deps: [],
|
||||
}),
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
|
@ -20,6 +20,8 @@ export * from "./input-password/password-input-result";
|
||||
|
||||
// login
|
||||
export * from "./login/login.component";
|
||||
export * from "./login/login.service";
|
||||
export * from "./login/default-login.service";
|
||||
|
||||
// password callout
|
||||
export * from "./password-callout/password-callout.component";
|
||||
|
3
libs/auth/src/angular/login/default-login.service.ts
Normal file
3
libs/auth/src/angular/login/default-login.service.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import { LoginService } from "./login.service";
|
||||
|
||||
export class DefaultLoginService implements LoginService {}
|
@ -13,6 +13,8 @@ import {
|
||||
FormFieldModule,
|
||||
} from "@bitwarden/components";
|
||||
|
||||
import { LoginService } from "./login.service";
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
templateUrl: "./login.component.html",
|
||||
@ -39,6 +41,7 @@ export class LoginComponentV2 implements OnInit {
|
||||
private activatedRoute: ActivatedRoute,
|
||||
private formBuilder: FormBuilder,
|
||||
private loginEmailService: LoginEmailServiceAbstraction,
|
||||
private loginService: LoginService,
|
||||
) {}
|
||||
|
||||
async ngOnInit(): Promise<void> {
|
||||
|
1
libs/auth/src/angular/login/login.service.ts
Normal file
1
libs/auth/src/angular/login/login.service.ts
Normal file
@ -0,0 +1 @@
|
||||
export abstract class LoginService {}
|
Loading…
Reference in New Issue
Block a user