Browse Source

[PM-107][PM-130] Remove fingerprint from request (#4910)

* [PM-108] Fingerprint is calculated based on pubKey

* [PM-108] Change userId to userEmail. Remove fingerprint from AuthResponse

* [PM-130][PM-107] Remove fingerprint from request and clients UI
pull/5067/head
André Bispo 3 years ago committed by GitHub
parent
commit
5d88fabe47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      apps/browser/src/auth/popup/login-with-device.component.html
  2. 2
      apps/desktop/src/auth/login/login-with-device.component.html
  3. 2
      apps/web/src/auth/login/login-with-device.component.html
  4. 11
      libs/angular/src/auth/components/login-with-device.component.ts
  5. 3
      libs/common/src/auth/models/request/passwordless-create-auth.request.ts

2
apps/browser/src/auth/popup/login-with-device.component.html

@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
<div>
<b class="fingerprint-phrase-header">{{ "fingerprintPhraseHeader" | i18n }}</b>
<p class="fingerprint-text">
<code>{{ passwordlessRequest?.fingerprintPhrase }}</code>
<code>{{ fingerprintPhrase }}</code>
</p>
</div>

2
apps/desktop/src/auth/login/login-with-device.component.html

@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
<div class="fingerprint section">
<h4>{{ "fingerprintPhraseHeader" | i18n }}</h4>
<code>{{ passwordlessRequest?.fingerprintPhrase }}</code>
<code>{{ fingerprintPhrase }}</code>
</div>
<div class="section" *ngIf="showResendNotification">

2
apps/web/src/auth/login/login-with-device.component.html

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

11
libs/angular/src/auth/components/login-with-device.component.ts

@ -35,6 +35,7 @@ export class LoginWithDeviceComponent @@ -35,6 +35,7 @@ export class LoginWithDeviceComponent
email: string;
showResendNotification = false;
passwordlessRequest: PasswordlessCreateAuthRequest;
fingerprintPhrase: string;
onSuccessfulLoginTwoFactorNavigate: () => Promise<any>;
onSuccessfulLogin: () => Promise<any>;
onSuccessfulLoginNavigate: () => Promise<any>;
@ -170,20 +171,20 @@ export class LoginWithDeviceComponent @@ -170,20 +171,20 @@ export class LoginWithDeviceComponent
private async buildAuthRequest() {
this.authRequestKeyPair = await this.cryptoFunctionService.rsaGenerateKeyPair(2048);
const fingerprint = await (
await this.cryptoService.getFingerprint(this.email, this.authRequestKeyPair[0])
).join("-");
const deviceIdentifier = await this.appIdService.getAppId();
const publicKey = Utils.fromBufferToB64(this.authRequestKeyPair[0]);
const accessCode = await this.passwordGenerationService.generatePassword({ length: 25 });
this.fingerprintPhrase = (
await this.cryptoService.getFingerprint(this.email, this.authRequestKeyPair[0])
).join("-");
this.passwordlessRequest = new PasswordlessCreateAuthRequest(
this.email,
deviceIdentifier,
publicKey,
AuthRequestType.AuthenticateAndUnlock,
accessCode,
fingerprint
accessCode
);
}

3
libs/common/src/auth/models/request/passwordless-create-auth.request.ts

@ -6,7 +6,6 @@ export class PasswordlessCreateAuthRequest { @@ -6,7 +6,6 @@ export class PasswordlessCreateAuthRequest {
readonly deviceIdentifier: string,
readonly publicKey: string,
readonly type: AuthRequestType,
readonly accessCode: string,
readonly fingerprintPhrase: string
readonly accessCode: string
) {}
}

Loading…
Cancel
Save