From 2e907fd02fc7f7058005646de292edb07cb019f5 Mon Sep 17 00:00:00 2001 From: rr-bw <102181210+rr-bw@users.noreply.github.com> Date: Fri, 22 Aug 2025 10:44:27 -0700 Subject: [PATCH] add comment --- .../login-via-auth-request.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts b/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts index 5ccc221777a..85847594be3 100644 --- a/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts +++ b/libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts @@ -644,11 +644,15 @@ export class LoginViaAuthRequestComponent implements OnInit, OnDestroy { userId, ); } catch (error) { + // If the component privateKey cannot decrypt the authRequestPublicKeyEncryptedUserKey on an auth request response, + // it means that auth request is no longer valid (i.e. the newer component privateKey does not belong to the same key pair + // as the older publicKey that encrypted the user key). Clear and start a new request. this.logService.error(error); this.toastService.showToast({ variant: "info", message: this.i18nService.t("thatRequestIsNoLongerValidStartingNewRequest"), }); + await this.clearExistingStandardAuthRequestAndStartNewRequest(); this.loading = false; }