Jump to content

How to save user PushSubscriptions?


pwFoo
 Share

Recommended Posts

I have client side code which create a notification api subscription and send it to the server (PW, process module). Now I think about how to save the subscription?

{
	endpoint: "https://fcm.googleapis.com/fcm/send/<DEVICE_ID>", 
	key: <KEY>, 
	token: <AUTH_TOKEN>, 
	expirationTime: null
}

URL and DEVICE_ID is different dependent on browser (android, chrome, firefox, edge).

 

How and where (in the page tree) should I save multiple user subscriptions?

If a unsubscribe is executed the subscription have to be removed from the database / user. So I need a identifier to delete the subscription.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...