-
Notifications
You must be signed in to change notification settings - Fork 2
VapidConfig
Viames Marino edited this page Feb 22, 2026
·
1 revision
Pair\Push\VapidConfig reads Web Push VAPID settings from environment.
Required .env variables:
PUSH_VAPID_PUBLICPUSH_VAPID_PRIVATEPUSH_VAPID_SUBJECT
Each method throws RuntimeException if value is missing/empty.
$config = new \Pair\Push\VapidConfig();
$public = $config->publicKey();
$private = $config->privateKey();
$subject = $config->subject();-
subjectshould be a contact URL ormailto:value. - Keep private key secret and never expose it to frontend.
- Public key is the one used by browser subscription flows (
PairPush.subscribe).
See also: WebPushSender, PushDispatcher, Configuration-file.