Cloudflare’s November 12 RealtimeKit update adds custom token validity windows and individual token revocation. There is a separate behavior worth checking before calling a refresh “rotation”: issuing a new participant token does not invalidate the old one. For an event product, access can outlive the intended window if the application keeps renewing it or leaves an earlier credential usable.
AI disclosure: This article was generated with AI assistance from the public sources linked below, with automated fact-checking and editorial inspection. It has not been reviewed by Keith.
Refresh adds a credential
The participant documentation says the backend can refresh a token before or after expiration. The new token uses the existing participant record and preset. Previously issued tokens remain valid until their own expiration, unless separately invalidated through the documented controls.
That matters when a browser has more than one tab open, a participant changes devices, or the application retries a request. Receiving token B is not evidence that token A stopped working.
The new fields let a backend choose not_before and expires_on. Both are optional. Cloudflare says existing integrations that omit them continue receiving tokens valid for 100 days. Adding a new control to the platform does not automatically shorten the credentials an existing application issues.
For a scheduled community session, the application should decide the access window before requesting a token. That decision may include an early-arrival buffer or an allowance for a session that runs late. Those are product rules with real consequences for attendees, rather than arbitrary values copied from an API example.
The documentation requires timestamps with a timezone offset. Store the intended deadline unambiguously and verify the returned UTC values. An organizer’s displayed local time should agree with the credential window the backend actually requested.
A temporary community needs a closing rule
The connection to my work comes from From Strangers. Its public case study describes an event community app built around phone-based sign-in, a QR check-in pattern, gated participation, and shared event spaces. The design starts with the short period during which an in-person event creates a useful temporary community.
That is relevant design context, not a claim that From Strangers uses RealtimeKit or currently offers video meetings. Consider an illustrative extension: attendees can join a remote introduction session associated with an event.
Several decisions immediately become separate. Someone may remain signed in to the event app after the introduction session closes. They may retain access to permitted event photos while losing permission to join a live conversation. A phone identity or an earlier check-in does not, by itself, decide how long every later capability should last.
A useful closing rule therefore belongs in the application’s authorization logic. It should explain whether the session can be extended, who can extend it, and what attendees see when their join window has ended. A generic “invalid token” message leaves the participant guessing whether to sign in again or contact the organizer.
Revoking one token has a narrower effect
Cloudflare also documents an important difference between revoking a token and removing a participant. A single-token revocation leaves that participant’s other tokens valid. Revocation can take up to 60 seconds to be rejected everywhere; Cloudflare directs developers who need immediate blocking across the participant’s tokens to delete the participant.
The revocation section also says revocation or participant deletion removes the participant from an active session. These controls deserve explicit handling in the backend and organizer interface.
Suppose support is trying to remove an attendee who obtained two tokens. Revoking only the token visible in the most recent request does not establish that the other credential is unusable. Conversely, removing the participant is broader than refreshing a credential for someone who is still entitled to attend.
The operator should be able to identify the participant and the action’s scope without handling raw tokens in a general support log. Record the operation and its result, while keeping credentials out of screenshots and ordinary troubleshooting notes.
Test the next issuance, too
For a proposed implementation, I would rehearse the whole access lifecycle with synthetic participants:
- Issue token A during an allowed window, then refresh to obtain token B. Verify the documented behavior of both credentials independently.
- End the application’s access window. Attempt the join flow again and request a refresh through the backend.
- Confirm that the backend rechecks current eligibility before issuing another credential. An expired token should not become a shortcut around the event’s closing rule.
- Revoke one token and check another token for the same participant. Then separately test participant removal and the connected client’s response.
These are acceptance checks to run, not reported results from Keith’s projects. Include an already-connected client as well as a fresh join attempt; observing a blocked join does not demonstrate that every existing connection was removed.
Shorter validity windows reduce how long an issued credential can be reused, but increase the importance of renewal behavior and helpful error handling. A session that runs late needs a deliberate extension path. A closed session needs the backend to stop granting fresh access.
The new controls give teams more precise options. The implementation is complete when the deadline, renewal decision, removal action, and attendee experience agree about who can still join.
Top comments (0)