Using the useJustAuth Hook
Overview
The useJustAuth
hook provides access to all authentication-related functionality in your component.
How to Use
Import the hook:
Destructure the necessary values and functions:
Returned Values
isAuthenticated
(boolean): Indicates if the user is logged in.userEmail
(string): The email of the authenticated user.userAddress
(string): The address of the authenticated user.openAuthModal
(function): Function to open the authentication modal.logout
(function): Function to log out the user.signMessage
(function): Function to sign a message.signTransaction
(function): Function to sign a Tron transaction.exportPrivateKey
(function): Function to export the user’s private key.
Last updated