OptionalapiOptionalauthOpciones de autenticación
URL base de la API (ej: 'http://localhost:8000') - Debe apuntar al Gateway unificado
OptionalglobalOpciones globales (fetch, headers)
OptionalredirectsAuto-redirect after auth callbacks (recovery, invite, sign in). The SDK detects the callback type from the URL hash and redirects automatically.
Example:
createClient(url, {
redirects: {
passwordRecovery: '/set-password',
signIn: '/dashboard',
}
});
OptionalserviceService role key for direct database access (admin-level).
When provided, enables client.db.direct for CRUD and raw SQL
without creating endpoints or workflows.
WARNING: Server-side only. Never expose this key in browser code.
For end-user data access, use endpoints with client.db.from() or client.api.
OptionalstorageOpcional: ID para aislar localStorage entre múltiples clientes
DYPAI API Key pública. Opcional si todas las llamadas son autenticadas con JWT