Website · Getting started · Docs · Set up with your AI assistant
@nebulr-group/bridge-auth-core is the framework-agnostic client behind every Bridge SDK: sign-in flows, sessions and token refresh, feature flags, billing state and the management API. Use it directly in any JavaScript app, or reach for the framework package that wraps it.
The Bridge is a hosted backend for SaaS apps. It gives you sign-in (passwords, magic links, passkeys, social login and SSO), multi-tenant workspaces with roles, Stripe subscriptions with plan limits, and feature flags, all managed from one dashboard. Your AI coding assistant can set it up for you through the Bridge MCP server.
Let your AI assistant set it up. Connect the Bridge MCP server to Claude, Cursor, Copilot or Gemini CLI and ask it to add Bridge to your app. Not using MCP? Run
npx @nebulr-group/bridge-cli guide add-loginin your project: it detects your framework frompackage.jsonand prints the steps for your assistant to follow.npx @nebulr-group/bridge-cli doctorchecks the result.
npm install @nebulr-group/bridge-auth-coreimport { BridgeAuth } from '@nebulr-group/bridge-auth-core';
const bridge = new BridgeAuth({
appId: 'your-app-id',
callbackUrl: 'https://your-app.com/auth/oauth-callback',
});
// A "Sign in" button sends the user to the hosted sign-in page
signInButton.addEventListener('click', () => bridge.login());
// On your callback route, exchange the code for tokens
const code = new URLSearchParams(location.search).get('code');
if (code) await bridge.handleCallback(code);
bridge.getCurrentUser(); // the signed-in user, or null
await bridge.isFeatureEnabled('new-editor'); // feature flagsBridgeAuth also covers in-app sign-in: passwords, magic links, passkeys, SSO, MFA, signup and workspace switching. Tokens are stored in localStorage in the browser and in memory on the server; pass storage to use your own.
BridgeManagement uses an API key, so it belongs on your server, in CI or in a script, never in a browser.
import { BridgeManagement } from '@nebulr-group/bridge-auth-core';
const mgmt = new BridgeManagement({ apiKey: process.env.BRIDGE_API_KEY });
const tenants = await mgmt.tenants.list();
const flags = await mgmt.flags.list();The framework packages below wrap this core with components, route guards and decorators. Start there if your framework is listed.
| Package | For |
|---|---|
@nebulr-group/bridge-svelte |
SvelteKit |
@nebulr-group/bridge-react |
React |
@nebulr-group/bridge-nextjs |
Next.js |
@nebulr-group/bridge-angular |
Angular |
@nebulr-group/bridge-nestjs |
NestJS |
@nebulr-group/bridge-express |
Express |
@nebulr-group/bridge-cli |
CLI for people and AI agents |
MIT © Nebulr. Built by The Bridge.
