Skip to content

Commit

Permalink
properly encode vapid keys
Browse files Browse the repository at this point in the history
applicationServerKey argument to PushManager.subscribe should be Base64URL encoded (without padding)
  • Loading branch information
schlawg authored Dec 29, 2024
1 parent 8111bfb commit 76207f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/push/src/main/Env.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ final class Env(

private val config = appConfig.get[PushConfig]("push")(AutoConfig.loader)

def vapidPublicKey = config.web.vapidPublicKey
lazy val vapidPublicKey = config.web.vapidPublicKey.replace("/", "_").replace("+", "-").replace("=", "")

private val deviceApi = DeviceApi(db(config.deviceColl))
val webSubscriptionApi = WebSubscriptionApi(db(config.subscriptionColl))
Expand Down

0 comments on commit 76207f4

Please sign in to comment.