diff --git a/apps/browser/src/auth/popup/login-with-device.component.html b/apps/browser/src/auth/popup/login-with-device.component.html index cb2a248170c..d794b7d212b 100644 --- a/apps/browser/src/auth/popup/login-with-device.component.html +++ b/apps/browser/src/auth/popup/login-with-device.component.html @@ -19,7 +19,7 @@
{{ "fingerprintPhraseHeader" | i18n }}

- {{ passwordlessRequest?.fingerprintPhrase }} + {{ fingerprintPhrase }}

diff --git a/apps/desktop/src/auth/login/login-with-device.component.html b/apps/desktop/src/auth/login/login-with-device.component.html index c69a974d6d3..a1fcb424000 100644 --- a/apps/desktop/src/auth/login/login-with-device.component.html +++ b/apps/desktop/src/auth/login/login-with-device.component.html @@ -27,7 +27,7 @@

{{ "fingerprintPhraseHeader" | i18n }}

- {{ passwordlessRequest?.fingerprintPhrase }} + {{ fingerprintPhrase }}
diff --git a/apps/web/src/auth/login/login-with-device.component.html b/apps/web/src/auth/login/login-with-device.component.html index 84598b11ff4..f7cad808939 100644 --- a/apps/web/src/auth/login/login-with-device.component.html +++ b/apps/web/src/auth/login/login-with-device.component.html @@ -25,7 +25,7 @@

{{ "fingerprintPhraseHeader" | i18n }}

- {{ passwordlessRequest?.fingerprintPhrase }} + {{ fingerprintPhrase }}

diff --git a/libs/angular/src/auth/components/login-with-device.component.ts b/libs/angular/src/auth/components/login-with-device.component.ts index 61aaec1dd87..5bf520cab6e 100644 --- a/libs/angular/src/auth/components/login-with-device.component.ts +++ b/libs/angular/src/auth/components/login-with-device.component.ts @@ -35,6 +35,7 @@ export class LoginWithDeviceComponent email: string; showResendNotification = false; passwordlessRequest: PasswordlessCreateAuthRequest; + fingerprintPhrase: string; onSuccessfulLoginTwoFactorNavigate: () => Promise; onSuccessfulLogin: () => Promise; onSuccessfulLoginNavigate: () => Promise; @@ -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 ); } diff --git a/libs/common/src/auth/models/request/passwordless-create-auth.request.ts b/libs/common/src/auth/models/request/passwordless-create-auth.request.ts index cb85f823c26..865dd43dc63 100644 --- a/libs/common/src/auth/models/request/passwordless-create-auth.request.ts +++ b/libs/common/src/auth/models/request/passwordless-create-auth.request.ts @@ -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 ) {} }