-
![Bitwarden]()
-
- {{ "loginOrCreateNewAccount" | i18n }}
-
-
+
+
+ {{ "emailAddress" | i18n }}
+
+
+
+
+
+
+
+ {{ "rememberEmail" | i18n }}
+
+
+
+
+
+
-
-
-
- {{ "rememberEmail" | i18n }}
-
-
+
-
+
+ {{ "newAroundHere" | i18n }}
+
+ {{ "createAccount" | i18n }}
+
+
-
+
+
-
- {{ "newAroundHere" | i18n }}
-
- {{ "createAccount" | i18n }}
-
-
+
+
+
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
-
-
-
+
-
-
-
-
-
-
{{ "loggingInAs" | i18n }} {{ loggedEmail }}
-
{{ "notYou" | i18n }}
-
-
-
+
+
{{ "loggingInAs" | i18n }} {{ loggedEmail }}
+
{{ "notYou" | i18n }}
diff --git a/apps/web/src/app/auth/login/login.component.ts b/apps/web/src/app/auth/login/login.component.ts
index 51d46f46a42..1f174b7397a 100644
--- a/apps/web/src/app/auth/login/login.component.ts
+++ b/apps/web/src/app/auth/login/login.component.ts
@@ -43,7 +43,6 @@ export class LoginComponent extends BaseLoginComponent implements OnInit {
enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;
policies: Policy[];
showPasswordless = false;
-
constructor(
private acceptOrganizationInviteService: AcceptOrganizationInviteService,
devicesApiService: DevicesApiServiceAbstraction,
@@ -92,7 +91,13 @@ export class LoginComponent extends BaseLoginComponent implements OnInit {
this.onSuccessfulLoginNavigate = this.goAfterLogIn;
this.showPasswordless = flagEnabled("showPasswordless");
}
+ submitForm = async (showToast = true) => {
+ return await this.submitFormHelper(showToast);
+ };
+ private async submitFormHelper(showToast: boolean) {
+ await super.submit(showToast);
+ }
async ngOnInit() {
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
this.route.queryParams.pipe(first()).subscribe(async (qParams) => {
diff --git a/apps/web/src/app/oss-routing.module.ts b/apps/web/src/app/oss-routing.module.ts
index 0a15e058696..eed8b7d281c 100644
--- a/apps/web/src/app/oss-routing.module.ts
+++ b/apps/web/src/app/oss-routing.module.ts
@@ -66,7 +66,6 @@ const routes: Routes = [
children: [], // Children lets us have an empty component.
canActivate: [redirectGuard()], // Redirects either to vault, login, or lock page.
},
- { path: "login", component: LoginComponent, canActivate: [UnauthGuard] },
{
path: "login-with-device",
component: LoginViaAuthRequestComponent,
@@ -182,6 +181,24 @@ const routes: Routes = [
path: "",
component: AnonLayoutWrapperComponent,
children: [
+ {
+ path: "login",
+ canActivate: [unauthGuardFn()],
+ children: [
+ {
+ path: "",
+ component: LoginComponent,
+ },
+ {
+ path: "",
+ component: EnvironmentSelectorComponent,
+ outlet: "environment-selector",
+ },
+ ],
+ data: {
+ pageTitle: "logIn",
+ },
+ },
{
path: "2fa",
component: TwoFactorComponent,