UNPKG

@inertiapixel/nextjs-auth

Version:

A reusable Next.js authentication package supporting credentials, OTP, and OAuth login.

6 lines (5 loc) 191 B
export function getApiBaseUrl(req) { const urlParam = req.nextUrl.searchParams.get('apiBaseUrl'); // Prefer query param over env (if you want fallback) return urlParam || null; }