From 9be808177a06b33892be6fdd7c1cb31cf3b924fa Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 7 Nov 2025 21:44:24 -0500 Subject: Remove push subscriptions when rotating the VAPID key by hand. --- src/vapid/app.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/vapid') diff --git a/src/vapid/app.rs b/src/vapid/app.rs index 7d872ed..ebd2446 100644 --- a/src/vapid/app.rs +++ b/src/vapid/app.rs @@ -29,6 +29,11 @@ impl Vapid { // of the change. All we have to do is remove the existing key, so that the server can know // to do so. tx.vapid().clear().await?; + // Delete outstanding subscriptions for the existing VAPID key, as well. They're + // unserviceable once we lose the key. Clients can resubscribe when they process the next + // key rotation event, which will be quite quickly once the running server notices that the + // VAPID key has been removed. + tx.push().clear().await?; tx.commit().await?; Ok(()) -- cgit v1.2.3