SDK Reference
react
logout

logout Method

This method is used to logout the user from the Okto Wallet. It will only work if the user is already logged in.

Parameters

None

logout() => Promise<Boolean>;

Example

import { useOkto, type OktoContextType} from 'okto-sdk-react';
 
const { logout } = useOkto() as OktoContextType;
logout().then(result => console.log("logged out"));