Javascript Web Push: where can I get "auth" key? -


i'm stating using web push notification; don't know can find auth key:

var pushsubscription = {   endpoint: '< push subscription url >',   keys: {     p256dh: '< user public encryption key >',     auth: '< ???? user auth secret ???? >'   } }; 

i can endpoint , p256dh serviceworker>registeration.pushmanager.getsubscription() not auth key.

thanks

you can use getkey method both p256dh , auth (see the specs or the example specs).

it's simpler call json.stringify on pushsubscription object returned getsubscription promise.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -