Installation

Basic Setup

  1. Install the package:
npm install @heimdall/nextjs
# or
yarn add @heimdall/nextjs
# or
pnpm add @heimdall/nextjs
# or
bun add @heimdall/nextjs
  1. Add the required environment variables to your .env.local:
HEIMDALL_API_URL=https://api.heimdall.com
HEIMDALL_CLIENT_ID=your_client_id
HEIMDALL_CLIENT_SECRET=your_client_secret
  1. Initialize the SDK in your app:
// app/providers.tsx
import { HeimdallProvider } from '@heimdall/nextjs'

export function Providers({ children }: { children: React.ReactNode }) {
  return (
    <HeimdallProvider>
      {children}
    </HeimdallProvider>
  )
}

For more detailed information about available integrations, see the Integrations documentation.

Was this page helpful?