1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-28 02:23:25 +00:00

on extension, include the authRequestId in the send message

This commit is contained in:
rr-bw
2025-11-06 09:56:01 -08:00
parent 1c8126680e
commit 6a7b519153
2 changed files with 8 additions and 2 deletions

View File

@@ -54,7 +54,11 @@ export class ExtensionAuthRequestAnsweringService
if (userIsAvailableToViewDialog) {
// Send message to open dialog immediately for this request
this.messagingService.send("openLoginApproval");
this.messagingService.send("openLoginApproval", {
// Include the authRequestId so the DeviceManagementComponent can upsert the correct device.
// This will only matter if the user is on the /device-management screen when the auth request is received.
notificationId: authRequestId,
});
} else {
// Create a system notification
const accounts = await firstValueFrom(this.accountService.accounts$);

View File

@@ -301,9 +301,11 @@ export class DefaultServerNotificationsService implements ServerNotificationsSer
notification.payload.id,
);
} else {
// This call is necessary for Web, which uses a NoopAuthRequstAnsweringService
// This call is necessary for Web, which uses a NoopAuthRequestAnsweringService
// that does not have a recievedPendingAuthRequest() method
this.messagingService.send("openLoginApproval", {
// Include the authRequestId so the DeviceManagementComponent can upsert the correct device.
// This will only matter if the user is on the /device-management screen when the auth request is received.
notificationId: notification.payload.id,
});
}