User Authentication
Last updated
Was this helpful?
Last updated
Was this helpful?
Pusher allows you to before deciding if the server should keep the connection or not. In this sense, Soketi allows you to authenticate the users of your app too. It also takes care of automatically.
All apps have this feature disabled by default, and you can decide for each app if this should be enabled or not.
By default, when the app has user authentication enabled, Soketi disconnects unauthenticated or unauthorized connections in 30 seconds. However, you can change this duration using the following environment variable:
With the help of the new HTTP API endpoint, Soketi can also allow you to send a message specific to an user id. This feature is implemented on all SDKs and you can see a JS sample below.
The SDKs namings differ, so ensure you use the latest SDK version for your language.
Soketi supports terminating a user's connections after it was authenticated. It stays in sync with Pusher's protocol and most of the SDKs are already implementing a method for this functionality. Ensure you use the latest SDK version for your language.