Skip to content

Creating/Refreshing tokens as a recurring task #960

Answered by jchambers
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

How does Pushy address this scenario or refresh tokens?

Each connection to the APNs server maintains internal state that tracks when its token was generated. It schedules a job to expire the token every 50 minutes. Please see TokenAuthenticationApnsClientHandler for implementation details.

If I want to setup a recurring task to generate and store the token in database so that all instances share same token, how would I generate the token using this library? Is there an example?

This is not necessary; token age restrictions are enforced at the level of individual connections rather than applications/sets of credentials. Because there's no need to synchronize tokens across connections, …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant