Logout()

logout(signal?: AbortSignal)

This function sends a REST request to the /auth/logout endpoint to log out the user. It removes the user's authentication cookie from the browser. This method also removes the internal token and triggers a auth().on("logout") event. Make sure to handle it appropriately with your token storage system.

await client.auth().logout();
Edit this page on Github
© 2025 kav3.com. Crafted with and dedication.