If you have lost access to the Firebase project that was used to configure web push notifications, you will need to create a new configuration. It is not possible to directly migrate existing subscribers to a new configuration because their push tokens are tied to the original Firebase project.
When you change the configuration, the old push tokens become invalid. To continue sending notifications to your audience, they must be re-subscribed under the new configuration.
Here are your options for re-configuration:
Recommended Method: Use VAPID Keys
Our current web push setup allows you to generate VAPID keys directly within your Pushwoosh project, removing the dependency on Firebase. This is the simplest and most reliable method.
- Navigate to the web push configuration section in your Pushwoosh project.
- Choose to create a new configuration using VAPID keys generated by Pushwoosh.
- Save the new configuration.
Alternative Method: Use a New Firebase Project
If you prefer to continue using Firebase:
- Create a new project in your Firebase console.
- Generate a new set of credentials (
.jsonfile). - In your Pushwoosh project, update the web push configuration by uploading the new Firebase credentials.
What Happens to Your Subscribers?
After you update the configuration, your existing subscribers will be re-subscribed automatically when they next visit your website. The Pushwoosh Web SDK on your site will generate a new, valid push token for them.
To ensure a seamless experience for your users:
- Consider using the
autoSubscribe: trueparameter in your Web SDK initialization code. If a user has previously granted notification permissions, this will re-subscribe them in the background without showing another permission prompt. - Expect
InvalidCredentialserrors: After switching configurations, you will likely see an increase inInvalidCredentialserrors when you send a push. This is normal. It happens because the system is attempting to send to the old, now-invalid tokens. These old tokens will be automatically removed from your database. The error count will decrease as more users visit your site and receive new, valid tokens.
Comments
0 comments
Please sign in to leave a comment.