Auth Events

All of these events are triggered from the local client.

Login

Triggered when a user successfully logs in. The callback receives the authentication token.

client.auth().on("login", token => { /* Store token for future use. */ });

Register

Triggered when a new user registers successfully. The callback receives the user details.

client.auth().on("register", token => { /* Store token for future use. */ });

Logout

Triggered when the user logs out. No parameters are passed.

client.auth().on("logout", () => { /* Redirect to another page (e.g., the home page) */ });
Edit this page on Github
© 2025 kav3.com. Crafted with and dedication.