Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SG-168] Passwordless login web MVP #3424

Merged
merged 46 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
07c5140
passwordless login page redesign
gbubemismith Aug 4, 2022
8d7c4b3
passwordless login page redesign
gbubemismith Aug 4, 2022
6f24fec
restyled login form to use tailwind
gbubemismith Aug 4, 2022
67a9b77
restyled login form to use tailwind
gbubemismith Aug 4, 2022
bddf8f8
moved texts on login device template to locales
gbubemismith Aug 5, 2022
c3eae6b
made reactive form changes for clients
gbubemismith Aug 5, 2022
51b7609
added request model
gbubemismith Aug 9, 2022
49f3149
made more changes
gbubemismith Aug 11, 2022
4216a98
fixed merge conflict
gbubemismith Aug 11, 2022
ff7125f
added implmentation to auth request api
gbubemismith Aug 11, 2022
5c91147
fixed refrencing issue
gbubemismith Aug 12, 2022
4abe802
renamed model property
gbubemismith Aug 15, 2022
4c9d832
Added resend notification functionality
gbubemismith Aug 16, 2022
2779f70
Added new file
gbubemismith Aug 19, 2022
a8bb6fb
login with device first draft
gbubemismith Aug 19, 2022
bbad8db
login with device first draft
gbubemismith Aug 21, 2022
d693a07
login with device first draft
gbubemismith Aug 21, 2022
25304b4
login with device first draft
gbubemismith Aug 23, 2022
b694d00
connection to anonymous hub
gbubemismith Aug 25, 2022
f1bbffa
connection to anonymous hub
gbubemismith Aug 26, 2022
f3a7951
refactored confirm login response
gbubemismith Aug 26, 2022
3dee096
removed comment
gbubemismith Aug 29, 2022
8d6a410
cleaned up login
gbubemismith Aug 30, 2022
d0a7c80
fixed merge conflict
gbubemismith Aug 31, 2022
0c70ecd
fixed merge conflict
gbubemismith Sep 12, 2022
4d94cb8
changed uptyped form builder
gbubemismith Sep 12, 2022
3769285
changed uptyped form builder
gbubemismith Sep 12, 2022
1e59819
[SG-168] Update login strategy with passwordless login credentials.
andrebispo5 Sep 14, 2022
f7d12a6
[SG-168] Removed logs. Changed inputs for passwordless logic strategy…
andrebispo5 Sep 15, 2022
4ff19f2
Merge branch 'master' into SG-168/login-with-device-request
gbubemismith Sep 15, 2022
5c35cfd
Merge branch 'SG-168/login-with-device-request' of github.com:bitward…
gbubemismith Sep 15, 2022
07f26e9
code cleanup
gbubemismith Sep 15, 2022
1a869a9
code cleanup
gbubemismith Sep 15, 2022
93ea78c
fixed merge conflict
gbubemismith Sep 16, 2022
37c92d2
Merge branch 'master' into SG-168/login-with-device-request
gbubemismith Sep 21, 2022
c5d796e
removed login with device from self hosted
gbubemismith Sep 21, 2022
7cbb41b
fixed PR comments
gbubemismith Sep 22, 2022
424bc1b
added module for login
gbubemismith Sep 22, 2022
c434e03
fixed post request bug
gbubemismith Sep 22, 2022
4673295
Merge branch 'master' into SG-168/login-with-device-request
gbubemismith Sep 22, 2022
5b033fa
Merge branch 'master' into SG-168/login-with-device-request
gbubemismith Sep 23, 2022
2a08188
added feature flag
gbubemismith Sep 26, 2022
d417012
Merge branch 'master' into SG-168/login-with-device-request
gbubemismith Sep 26, 2022
39dcc90
added feature flag
gbubemismith Sep 26, 2022
2da9179
added feature flag
gbubemismith Sep 26, 2022
a4fe432
Merge branch 'master' into SG-168/login-with-device-request
gbubemismith Sep 26, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 3 additions & 13 deletions apps/browser/src/popup/accounts/login.component.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise">
<form #form (ngSubmit)="submit()" [appApiAction]="formPromise" [formGroup]="formGroup">
<header>
<div class="left">
<button type="button" routerLink="/home">{{ "cancel" | i18n }}</button>
Expand All @@ -18,26 +18,16 @@ <h1 class="center">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="email">{{ "emailAddress" | i18n }}</label>
<input
id="email"
type="text"
name="Email"
[(ngModel)]="email"
required
inputmode="email"
appInputVerbatim="false"
/>
<input id="email" type="email" formControlName="email" appInputVerbatim="false" />
</div>
<div class="box-content-row box-content-row-flex" appBoxRow>
<div class="row-main">
<label for="masterPassword">{{ "masterPass" | i18n }}</label>
<input
id="masterPassword"
type="{{ showPassword ? 'text' : 'password' }}"
name="MasterPassword"
class="monospaced"
[(ngModel)]="masterPassword"
required
formControlName="masterPassword"
appInputVerbatim
/>
</div>
Expand Down
10 changes: 8 additions & 2 deletions apps/browser/src/popup/accounts/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { Component, NgZone } from "@angular/core";
import { FormBuilder } from "@angular/forms";
import { Router } from "@angular/router";

import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/components/login.component";
import { AuthService } from "@bitwarden/common/abstractions/auth.service";
import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service";
import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service";
import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
import { PasswordGenerationService } from "@bitwarden/common/abstractions/passwordGeneration.service";
Expand All @@ -30,7 +32,9 @@ export class LoginComponent extends BaseLoginComponent {
protected cryptoFunctionService: CryptoFunctionService,
syncService: SyncService,
logService: LogService,
ngZone: NgZone
ngZone: NgZone,
formBuilder: FormBuilder,
formValidationErrorService: FormValidationErrorsService
) {
super(
authService,
Expand All @@ -42,7 +46,9 @@ export class LoginComponent extends BaseLoginComponent {
passwordGenerationService,
cryptoFunctionService,
logService,
ngZone
ngZone,
formBuilder,
formValidationErrorService
);
super.onSuccessfulLogin = async () => {
await syncService.fullSync(true);
Expand Down
14 changes: 3 additions & 11 deletions apps/desktop/src/app/accounts/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#form
(ngSubmit)="submit()"
[appApiAction]="formPromise"
[formGroup]="formGroup"
attr.aria-hidden="{{ showingModal }}"
>
<div id="content" class="content">
Expand All @@ -25,25 +26,16 @@
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="email">{{ "emailAddress" | i18n }}</label>
<input
id="email"
type="text"
name="Email"
[(ngModel)]="email"
required
appInputVerbatim="false"
/>
<input id="email" type="email" formControlName="email" appInputVerbatim="false" />
</div>
<div class="box-content-row box-content-row-flex" appBoxRow>
<div class="row-main">
<label for="masterPassword">{{ "masterPass" | i18n }}</label>
<input
id="masterPassword"
type="{{ showPassword ? 'text' : 'password' }}"
name="MasterPassword"
class="monospaced"
[(ngModel)]="masterPassword"
required
formControlName="masterPassword"
appInputVerbatim
/>
</div>
Expand Down
10 changes: 8 additions & 2 deletions apps/desktop/src/app/accounts/login.component.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Component, NgZone, OnDestroy, ViewChild, ViewContainerRef } from "@angular/core";
import { FormBuilder } from "@angular/forms";
import { Router } from "@angular/router";

import { LoginComponent as BaseLoginComponent } from "@bitwarden/angular/components/login.component";
Expand All @@ -7,6 +8,7 @@ import { AuthService } from "@bitwarden/common/abstractions/auth.service";
import { BroadcasterService } from "@bitwarden/common/abstractions/broadcaster.service";
import { CryptoFunctionService } from "@bitwarden/common/abstractions/cryptoFunction.service";
import { EnvironmentService } from "@bitwarden/common/abstractions/environment.service";
import { FormValidationErrorsService } from "@bitwarden/common/abstractions/formValidationErrors.service";
import { I18nService } from "@bitwarden/common/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/abstractions/messaging.service";
Expand Down Expand Up @@ -47,7 +49,9 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
private broadcasterService: BroadcasterService,
ngZone: NgZone,
private messagingService: MessagingService,
logService: LogService
logService: LogService,
formBuilder: FormBuilder,
formValidationErrorService: FormValidationErrorsService
) {
super(
authService,
Expand All @@ -59,7 +63,9 @@ export class LoginComponent extends BaseLoginComponent implements OnDestroy {
passwordGenerationService,
cryptoFunctionService,
logService,
ngZone
ngZone,
formBuilder,
formValidationErrorService
);
super.onSuccessfulLogin = () => {
return syncService.fullSync(true);
Expand Down
4 changes: 3 additions & 1 deletion apps/web/config/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@
"port": 8080,
"allowedHosts": "auto"
},
"flags": {}
"flags": {
"showPasswordless": false
}
}
3 changes: 2 additions & 1 deletion apps/web/config/cloud.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"proxyEvents": "https://events.bitwarden.com"
},
"flags": {
"showTrial": true
"showTrial": true,
"showPasswordless": false
}
}
3 changes: 2 additions & 1 deletion apps/web/config/development.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"proxyNotifications": "http://localhost:61840"
},
"flags": {
"showTrial": true
"showTrial": true,
"showPasswordless": true
}
}
3 changes: 2 additions & 1 deletion apps/web/config/qa.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"proxyEvents": "https://events.qa.bitwarden.pw"
},
"flags": {
"showTrial": true
"showTrial": true,
"showPasswordless": true
}
}
3 changes: 2 additions & 1 deletion apps/web/config/selfhosted.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"port": 8081
},
"flags": {
"showTrial": false
"showTrial": false,
"showPasswordless": false
}
}
102 changes: 0 additions & 102 deletions apps/web/src/app/accounts/login.component.html

This file was deleted.

44 changes: 44 additions & 0 deletions apps/web/src/app/accounts/login/login-with-device.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<div
class="tw-mx-auto tw-mt-5 tw-flex tw-max-w-lg tw-flex-col tw-items-center tw-justify-center tw-p-8"
>
<div>
<img class="logo logo-themed" alt="Bitwarden" />
<p class="tw-mx-4 tw-mt-3 tw-mb-4 tw-text-center tw-text-xl">
{{ "loginOrCreateNewAccount" | i18n }}
</p>

<div
class="tw-mt-3 tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-6"
>
<h2 class="tw-mb-6 tw-text-xl tw-font-semibold">{{ "logInInitiated" | i18n }}</h2>

<div class="tw-text-light">
<p class="tw-mb-6">{{ "notificationSentDevice" | i18n }}</p>

<p class="tw-mb-6">
{{ "fingerprintMatchInfo" | i18n }}
</p>
</div>

<div class="tw-mb-6">
<h4 class="tw-font-semibold">{{ "fingerprintPhraseHeader" | i18n }}</h4>
<p>
<code>{{ passwordlessRequest?.fingerprintPhrase }}</code>
</p>
</div>

<div class="tw-my-10" *ngIf="showResendNotification">
<a [routerLink]="[]" disabled="true" (click)="startPasswordlessLogin()">{{
"resendNotification" | i18n
}}</a>
</div>

<hr />

<div class="tw-text-light tw-mt-3">
{{ "loginWithDevciceEnabledInfo" | i18n }}
<a routerLink="/login">{{ "viewAllLoginOptions" | i18n }}</a>
</div>
</div>
</div>
</div>