Skip to content

useOpenfortClient

Access the underlying Openfort client for advanced operations.

Usage

import { useOpenfortClient } from '@openfort/react-native';
 
function Advanced() {
  const client = useOpenfortClient();
 
  const getToken = async () => {
    const token = await client.getAccessToken();
  };
 
  return <Button title="Get Token" onPress={getToken} />;
}

Return type

Returns the OpenfortClient instance with access to:

client.auth              // Authentication methods
client.embeddedWallet    // Embedded wallet operations
client.getAccessToken()  // Get current access token

For the complete client API, see the openfort-js documentation.