Hiyve Components - v1.0.0
    Preparing search index...

    Interface IdentityProviderProps

    Props for the IdentityProvider component.

    Only apiKey is required. All other settings have sensible defaults for production use. Use environment: 'development' to target the development API server.

    interface IdentityProviderProps {
        apiKey?: string;
        autoRefresh?: boolean;
        basePath?: string;
        baseUrl?: string;
        children: ReactNode;
        environment?: "production" | "development";
        refreshBuffer?: number;
        timeout?: number;
        tokenStorage?: "localStorage" | "memory";
    }
    Index

    Properties

    apiKey?: string

    Hiyve API key for your organization.

    Must start with pk_live_ (production) or pk_test_ (development). Obtain this from the Hiyve console.

    Optional when using proxy mode. When omitted and no baseUrl is set, defaults to proxy mode with baseUrl = '/api/hiyve/identity'.

    autoRefresh?: boolean

    Automatically refresh tokens before they expire (default: true)

    basePath?: string

    Custom API base path (default: '/identity/auth'). Ignored when baseUrl is set.

    baseUrl?: string

    Full base URL for proxy mode.

    When set, requests are sent directly to this URL instead of the Hiyve Cloud API. The customer's server proxy injects the API key. Defaults to '/api/hiyve/identity' when neither apiKey nor baseUrl is provided.

    children: ReactNode

    Child components that can access identity hooks

    environment?: "production" | "development"

    API environment.

    • 'production' (default)
    • 'development'
    refreshBuffer?: number

    Seconds before token expiry to trigger a refresh (default: 300)

    timeout?: number

    Request timeout in milliseconds (default: 30000)

    tokenStorage?: "localStorage" | "memory"

    Where to persist authentication tokens.

    • 'localStorage' (default): Survives page refreshes and browser restarts
    • 'memory': Cleared on page refresh; useful for sensitive environments