sarthakbagaria / web-push

Web Push library in Haskell.
MIT License
12 stars 10 forks source link

Allow reading and writing VAPID keys in typical base64url format #13

Open tysonzero opened 17 hours ago

tysonzero commented 17 hours ago

Various tools give and receive VAPID keys in the typical base64 URL format, and converting between that format and the format used by this library is sufficiently error-prone and non-trivial to justify direct support IMO.

tysonzero commented 16 hours ago

Ok perhaps error-prone and non-trivial is a slight exaggeration, but to give additional context I was running into a JWT error and it wasn't clear if the issue was in the hand-written key format conversion code or in this library, slowing down debugging substantially. It now appears that the conversion code was fine and that the issue was with this library (or a dep) and has seen been fixed in 0.4.

Being able to just plug in the same base64 URL format I was using with node's web-push library would make debugging easier and just avoid some noisy base64 handling code from existing within the application, particularly given that this library already depends on base64-bytestring.