The refresh service broadcasts through Laravel Reverb. Company and client contexts use different private channels.

Configure and run

Configure BROADCAST_CONNECTION=reverb and the Reverb app credentials. The browser receives only the public app key, never the app secret. Set host, port and TLS scheme for the deployment.
Use a shared cache with lock support, such as Redis, for debouncing. Run Reverb and workers under a process manager in production.

Channels and authorization

Pusher adds the private- prefix on the wire. Do not add it to Echo.private() yourself. POST /broadcasting/auth uses exowpee.teams and exowpee.authenticated. It checks the active session and selected owner. Another owner or the wrong context cannot subscribe. The broadcast event is Exowpee\Notification\Events\ClientRefreshEvent. Its payload contains readKeysByActorId. Company human keys are assignment IDs, not user IDs. Agent keys are agent IDs. Client human keys are also assignment IDs.

Echo example

The fully qualified event name is required when listening without Echo’s default event namespace. Import Echo and Pusher according to the frontend’s setup. After switch or JWT refresh, replace the authorization token and recreate the connection or subscriptions. On logout or 401, close the connection and clear cached actor data.

Delivery limits

Channel authorization checks the JWT at subscription time. Revoking a session currently does not force an already authorized Reverb socket to disconnect. HTTP and new subscription attempts fail, but the existing socket can still receive messages. Frontend disconnection does not cover remote revocation. Do not claim immediate server-side WebSocket revocation. This limitation is accepted for the current IAM delivery. The frontend must close its connection on logout or on a 401 for that session. A client that ignores this behavior can keep receiving; do not add sensitive business data to these refresh broadcasts under the assumption that frontend disconnection protects it. The service and transport support marking read keys, invalidation and reset. Reset is called on agent login and human switch. Production business handlers do not yet call markRefreshKeyAsRead or invalidateRefreshKeys through NotificationInterface. Automatic cache invalidation after business writes is therefore not wired by this IAM change. Business read/invalidation wiring is deferred. The blocking work for resetting company/client actors and delivering their refresh signals is complete. Real Echo/Reverb delivery, queue handling and cross-channel refusals were verified in the local recipe on all four account types. That test does not remove these limits.

Upgrade queues

If an installation has pending jobs serialized by the old code, stop producers and drain the refresh queue with that code, then stop workers and Reverb. There are no old jobs in the current delivery environment, as confirmed by its operator. The refresh job’s serialized fields changed from companyId to scopeId and scopeType. Restarting workers alone cannot convert an old queued payload. Restart Reverb with the new code only after migrations and permission discovery.