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

Initialization

Overview

The JustAuthProvider component is used to initialize JustAuth in your React application. It manages authentication state and provides access to authentication functions throughout your app.

How to Use

  1. Import the JustAuthProvider:

    import { JustAuthProvider } from 'just-tron-auth';
  2. Wrap your main application component:

    function App() {
       return (
          <JustAuthProvider appId="YOUR_APP_ID">
             {/* Your app components */}
          </JustAuthProvider>
       );
    }

Parameters

  • appId (string): The unique identifier for your application, obtained from the JustAuth dashboard.

Example

<JustAuthProvider appId="YOUR_APP_ID">
   {/* Your app components */}
</JustAuthProvider>
PreviousIntegrationNextUsing the useJustAuth Hook

Last updated 8 months ago