Skip to main content

Signing User Out

Overview

Explore how to navigate the sign-out process using the Passport JS EVM SDK within Credenza. Understand this key step to managing sessions and ensuring secure logout.

Logout using Passport UI:

Accessing the Sign Out Page

You can open the Sign Out page using the UI. This process is explained in detail in the Sign Out page article.

Alternative Version: Logout Without UI

For situations where you prefer to log out without interacting with the UI, you can use a method provided by the Passport JS EVM SDK. This can be handy for automation scripts or custom client implementations.

Using the logout Method

To log out programmatically, use the passport.logout() function. Include the shouldRevokeSession parameter to specify whether the session should be revoked.

Here is an example of how to use this method:

typescript
await passport.logout({ shouldRevokeSession: true });

The shouldRevokeSession parameter is optional and defaults to false if not provided. Setting it to true will revoke the session.

Make sure to refer to the Passport JS SDK API documentation for more detailed information on this method.