Skip to content

Commit

Permalink
include public vapid key in web push recipients
Browse files Browse the repository at this point in the history
  • Loading branch information
owenpearson committed Jun 27, 2024
1 parent 20778ff commit 2d51e0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/common/lib/types/devicedetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ interface WebPushRecipient {
transportType: 'web';
targetUrl: string;
encryptionKey: WebPushEncryptionKey;
publicVapidKey: string;
}

interface PushChannelRecipient {
Expand Down
1 change: 1 addition & 0 deletions src/plugins/push/getW3CDeviceDetails.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ export async function getW3CPushDeviceDetails(machine: ActivationStateMachine) {
device.push.recipient = {
transportType: 'web',
targetUrl: btoa(endpoint),
publicVapidKey: appServerKey,
encryptionKey: {
p256dh: toBase64Url(p256dh),
auth: toBase64Url(auth),
Expand Down

0 comments on commit 2d51e0e

Please sign in to comment.