[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
This commit is contained in:
André Bispo 2023-03-23 11:02:51 +00:00 committed by GitHub
parent a5a12a6723
commit 5d88fabe47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -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>

View File

@ -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">

View File

@ -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>

View File

@ -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
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
);
}

View File

@ -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
) {}
}