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;
        emailVerificationRedirectUrl?: string;
        environment?: "production" | "development";
        passwordResetRedirectUrl?: string;
        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

    emailVerificationRedirectUrl?: string

    Base URL of your app's email-verification page (e.g. https://app.example.com/verify-email). Sent with register / resend requests so the verification link points back to your app and appends ?token=…. Without it, the identity service falls back to its own base URL.

    environment?: "production" | "development"

    API environment.

    • 'production' (default)
    • 'development'
    passwordResetRedirectUrl?: string

    Base URL of your app's password-reset page (e.g. https://app.example.com/reset-password). Sent with reset requests so the emailed link points back to your app and appends ?token=…. Without it, the identity service falls back to its own configured base URL.

    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