AvaCloud API
AvaCloud App
AvaCloud Wallet as a Service
AvaCloud Wallet as a Service
  • AvaCloud Wallet as a Service SDK
  • 🚀Getting Started
    • Quickstart
  • ⚙️USAGE
    • 🪝Hooks
      • useAvaCloudWallet
      • useAuth
      • useSignMessage
      • useSignTransaction
      • useTransferTokens
      • useUserWallets
      • useChainId
    • UI Components
      • LoginButton
      • WalletButton
      • WalletDisplay
      • UserProfile
      • WalletCard
      • TokensView
      • SendView
      • ReceiveView
      • ExportView
    • 🛠️Advanced Usage
Powered by GitBook

© 2025 Ava Labs, Inc.

On this page
  • Theme Customization
  • Custom Authentication Flow

Was this helpful?

  1. USAGE

Advanced Usage

For developers needing more control over the wallet integration including theme customization and custom authentication flows.

Theme Customization

Use the ThemeProvider to customize the appearance of UI components:

import { ThemeProvider } from '@avalabs/avacloud-waas-react';

function App() {
  return (
    <ThemeProvider darkMode={true}>
      <YourApp />
    </ThemeProvider>
  );
}

Custom Authentication Flow

You can implement a custom authentication flow using the lower-level hooks:

import { usePostMessage } from '@avalabs/avacloud-waas-react';

function CustomAuth() {
  const { sendMessage, lastMessage } = usePostMessage();

  const handleCustomLogin = () => {
    sendMessage({
      type: 'login',
      payload: {
        // Custom payload
      }
    });
  };

  // Handle response in useEffect
  useEffect(() => {
    if (lastMessage?.type === 'login_success') {
      // Handle successful login
    }
  }, [lastMessage]);

  return (
    <button onClick={handleCustomLogin}>
      Custom Login
    </button>
  );
}
PreviousExportView

Last updated 28 days ago

Was this helpful?

⚙️
🛠️