-
Notifications
You must be signed in to change notification settings - Fork 20
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
Client SDK to request a Beams Token from your backend server #97
Comments
@benw-pusher hi ben, is it possible to know if this will be prioritized or not? |
I have shared the feedback internally but at this time we cannot commit to a release. |
@benw-pusher hi any news on this? it has been more than a year now. |
Unfortunately, at this time we don't have this work scheduled. |
Actually, this is already possible.
push-notifications-web/index.d.ts Line 42 in 691ee32
push-notifications-web/index.d.ts Lines 4 to 6 in 691ee32
push-notifications-web/index.d.ts Lines 1 to 3 in 691ee32
You'll just need to create your own client.setUserId(userId, {
fetchToken: () => Promise.resolve({ token }),
}); |
I have tried multiple versions of the custom The token is being returned by my server and when decoded, it is the same shape as it is locally. Any idea what might be happening? |
Allow passing in the beams token when setting userId (instead of fetching from tokenProvider).
https://github.com/pusher/push-notifications-web/blob/master/src/push-notifications.js#L328
Use case: we have implemented our own logic to fetch the beams token (and we do not want to use the TokenProvider class that sends a request for us through the SDK).
The text was updated successfully, but these errors were encountered: