UNPKG

@ronin/better-auth

Version:
39 lines (36 loc) 947 B
import { AdapterInstance } from 'better-auth/types'; import { createSyntaxFactory } from 'ronin'; type SyntaxFactory = ReturnType<typeof createSyntaxFactory>; /** * Create a new Better Auth adapter to communicate with RONIN. * * @param [client] - A RONIN syntax factory instance. * * @returns A Better Auth adapter to communicate with RONIN * * @example * ```ts * import { ronin } from '@ronin/better-auth'; * import { betterAuth } from 'better-auth'; * * const auth = betterAuth({ * database: ronin() * }); * ``` * * @example * ```ts * import { ronin } from '@ronin/better-auth'; * import { createSyntaxFactory } from 'ronin'; * import { betterAuth } from 'better-auth'; * * const client = createSyntaxFactory({ * token: '1234' * }); * const auth = betterAuth({ * database: ronin(client) * }); * ``` */ declare const ronin: (client?: SyntaxFactory) => AdapterInstance; export { ronin as default, ronin };