Just Auth Docs
  • JustAuth
  • Getting Started with JustAuth
  • Integration
    • Initialization
    • Using the useJustAuth Hook
    • Opening the Auth Modal
    • Checking Authentication Status
    • Exporting Private Key
    • Logging Out
    • Signing Messages
    • Signing Transactions
Powered by GitBook
On this page
  • Overview
  • How to Use
  • Parameters
  • Example
  1. Integration

Logging Out

Overview

The logout function logs out the user from the application.

How to Use

  1. Destructure the function from the hook:

    const { logout } = useJustAuth();
  2. Call the function on a button click:

    <button onClick={logout}>Logout</button>

Parameters

  • No parameters are required for this function.

Example

const { logout } = useJustAuth();

<button onClick={logout}>Logout</button>
PreviousExporting Private KeyNextSigning Messages

Last updated 8 months ago