Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change output and input of VAPID from Buffer to String #210

Closed
gauntface opened this issue Aug 31, 2016 · 2 comments
Closed

Change output and input of VAPID from Buffer to String #210

gauntface opened this issue Aug 31, 2016 · 2 comments

Comments

@gauntface
Copy link

I'm constantly hitting issues with messing with VAPID keys as it's a buffer that I need to get into the web page, convert to unit8array and then find a way to store the VAPID keys so that I can then get that value back out and pass into the web-push library.

Exporting and importing VAPID keys as base64 url safe strings at least makes storing and re-using easier with the web push libs and we can then provide an example of how to use this base64 url string as the applicationServerKey in the page.

@marco-c what do you think?

@ithinkihaveacat
Copy link

I'd prefer this, it took me a little while to realize what formats were required, and then another while to figure out how to do the conversions.

If it's useful, here's what I ended up with.

@marco-c
Copy link
Member

marco-c commented Sep 1, 2016

Makes sense to me.

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

No branches or pull requests

3 participants