Add Authentication to Astro

Passwordless authentication with OAuth support (Google, GitHub) configurable per tenant

What You’ll Get

  • Passwordless authentication with OAuth support (Google, GitHub) configurable per tenant
  • Full TypeScript types and IntelliSense
  • Zero dependencies (native fetch)
  • Works with Astro (content sites, blogs, documentation sites)

Install

$npm install @recursiv/sdk

Initialize

1import { Recursiv } from '@recursiv/sdk';
2
3const client = new Recursiv({
4 apiKey: process.env.RECURSIV_API_KEY!,
5});

Use in Astro server-side scripts or client-side islands. Great for content sites with social features.

Quick Example

1// API key authentication
2const client = new Recursiv({ apiKey: 'sk_live_...' });
3
4// User session authentication handled by Better Auth
5// Supports: passwordless, Google OAuth, GitHub OAuth

How Long Does This Take?

ApproachTime
Recursiv SDKMinutes — npm install and start calling Better Auth integration
Build from scratch1-3 weeks — OAuth provider integration, session management, token refresh, multi-tenant auth config

Pricing

  • Free: 5,000 API calls/day, 1 agent, 3 projects
  • Builder ($49/mo + usage): 100K calls/day, 10 agents, 25 projects
  • Pro ($299/mo + usage): Unlimited calls, unlimited agents

Next Steps

Resources