summaryrefslogtreecommitdiff
path: root/internal/notify/vapid.go
blob: d93a09068417819e887ce69f2f6a84488ec89a83 (plain)
1
2
3
4
5
6
7
8
9
10
11
package notify

import webpush "github.com/SherClockHolmes/webpush-go"

// GenerateVAPIDKeys generates a VAPID key pair for web push notifications.
// Returns the base64url-encoded public and private keys.
// Note: webpush.GenerateVAPIDKeys returns (privateKey, publicKey) — we swap here.
func GenerateVAPIDKeys() (publicKey, privateKey string, err error) {
	privateKey, publicKey, err = webpush.GenerateVAPIDKeys()
	return
}