GoogleChrome / GoogleChrome/samples
important question subscription keys
- Dominant language
- JavaScript
- Stars
- 5.9k
- Forks
- 2.4k
- Avg merge
- 24m
- Merged PRs (30d)
- 2
Description
**I have such code on the server. It logs user keys for subscribing service wokers to the server.**
exports.PushUsers = (req,res) =>{
const subscription = req.body
console.log("ITSKEY",subscription.keys.p256dh )
**On the external interface there is code that is responsible for subscribing to the push notification server.**
function sendSubscription(subscription) {
return fetch(`${process.env.REACT_APP_API_URL}/push/user/`, {
method: 'POST',
body: JSON.stringify(subscription),
headers: {
'Content-Type': 'application/json'
}
})
}
**Can I find out what subscriptions user has subscription.keys?**
P.S. I tried to log the subscription object. But there are no keys in it. Apparently, the mechanics of their formation are encapsulated.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.