Skip to content

fix(webpush): use base64url encoding for push subscription tokens#376

Merged
mremond merged 1 commit intodevelfrom
fix/web-push-base64url-encoding
May 4, 2026
Merged

fix(webpush): use base64url encoding for push subscription tokens#376
mremond merged 1 commit intodevelfrom
fix/web-push-base64url-encoding

Conversation

@sebastienluquet
Copy link
Copy Markdown
Collaborator

Use subscription.toJSON() instead of manually encoding ArrayBuffer keys with btoa(), which produced standard base64 (with +, / and = padding) instead of base64url (-, _ and no padding) as required by the Web Push standard and ejabberd.

Fixes both the register and disable flows in useWebPush and NotificationsSettings.

Use subscription.toJSON() instead of manually encoding ArrayBuffer keys
with btoa(), which produced standard base64 (with +, / and = padding)
instead of base64url (-, _ and no padding) as required by the Web Push
standard and ejabberd.

Fixes both the register and disable flows in useWebPush and
NotificationsSettings.
@mremond mremond merged commit 5aee79c into devel May 4, 2026
1 check passed
@mremond mremond deleted the fix/web-push-base64url-encoding branch May 4, 2026 08:18
@mremond mremond added this to the 0.16.0 milestone May 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants