diff --git a/.vscode/settings.json b/.vscode/settings.json index 1b972bfc68..ac72937d35 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -6,5 +6,8 @@ }, "[jsonc]": { "editor.defaultFormatter": "biomejs.biome" + }, + "[svelte]": { + "editor.defaultFormatter": "svelte.svelte-vscode" } } diff --git a/dev/bc-fe/hono/db.sqlite b/dev/bc-fe/hono/db.sqlite index ce459eab41..6474cce883 100644 Binary files a/dev/bc-fe/hono/db.sqlite and b/dev/bc-fe/hono/db.sqlite differ diff --git a/dev/next-app/src/app/api/[...auth]/route.ts b/dev/next-app/src/app/api/[...auth]/route.ts index 1fa66fd364..5b67b0644b 100644 --- a/dev/next-app/src/app/api/[...auth]/route.ts +++ b/dev/next-app/src/app/api/[...auth]/route.ts @@ -1,10 +1,4 @@ import { auth } from "@/lib/auth"; -import type { NextRequest } from "next/server"; +import { toNextJsHandler } from "better-auth/next-js"; -const handler = auth.handler; - -export const POST = async (req: NextRequest) => { - return handler(req); -}; - -export { handler as GET }; +export const { GET, POST } = toNextJsHandler(auth); diff --git a/dev/next-app/src/lib/auth-client.ts b/dev/next-app/src/lib/auth-client.ts index b3c82c06d7..9d11b16704 100644 --- a/dev/next-app/src/lib/auth-client.ts +++ b/dev/next-app/src/lib/auth-client.ts @@ -1,8 +1,9 @@ import { createAuthClient } from "better-auth/react"; -import type { auth } from "./auth"; +import { organization } from "better-auth/client"; -export const authClient = createAuthClient({ +export const authClient = createAuthClient({ baseURL: "http://localhost:3000/api/auth", + authPlugins: [organization], }); export const { diff --git a/dev/solidjs/.gitignore b/dev/solidjs/.gitignore new file mode 100644 index 0000000000..ff04496935 --- /dev/null +++ b/dev/solidjs/.gitignore @@ -0,0 +1,28 @@ + +dist +.solid +.output +.vercel +.netlify +.vinxi + +# Environment +.env +.env*.local + +# dependencies +/node_modules + +# IDEs and editors +/.idea +.project +.classpath +*.launch +.settings/ + +# Temp +gitignore + +# System Files +.DS_Store +Thumbs.db diff --git a/dev/solidjs/README.md b/dev/solidjs/README.md new file mode 100644 index 0000000000..a84af3943c --- /dev/null +++ b/dev/solidjs/README.md @@ -0,0 +1,32 @@ +# SolidStart + +Everything you need to build a Solid project, powered by [`solid-start`](https://start.solidjs.com); + +## Creating a project + +```bash +# create a new project in the current directory +npm init solid@latest + +# create a new project in my-app +npm init solid@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +Solid apps are built with _presets_, which optimise your project for deployment to different environments. + +By default, `npm run build` will generate a Node app that you can run with `npm start`. To use a different preset, add it to the `devDependencies` in `package.json` and specify in your `app.config.js`. + +## This project was created with the [Solid CLI](https://solid-cli.netlify.app) diff --git a/dev/solidjs/app.config.timestamp_1725139690308.js b/dev/solidjs/app.config.timestamp_1725139690308.js new file mode 100644 index 0000000000..8515eb3ffd --- /dev/null +++ b/dev/solidjs/app.config.timestamp_1725139690308.js @@ -0,0 +1,6 @@ +// app.config.ts +import { defineConfig } from "@solidjs/start/config"; +var app_config_default = defineConfig({}); +export { + app_config_default as default +}; diff --git a/dev/solidjs/app.config.ts b/dev/solidjs/app.config.ts new file mode 100644 index 0000000000..de7f83103a --- /dev/null +++ b/dev/solidjs/app.config.ts @@ -0,0 +1,3 @@ +import { defineConfig } from "@solidjs/start/config"; + +export default defineConfig({}); diff --git a/dev/solidjs/db.sqlite b/dev/solidjs/db.sqlite new file mode 100644 index 0000000000..b99b72d02d Binary files /dev/null and b/dev/solidjs/db.sqlite differ diff --git a/dev/solidjs/package.json b/dev/solidjs/package.json new file mode 100644 index 0000000000..c57cdad105 --- /dev/null +++ b/dev/solidjs/package.json @@ -0,0 +1,22 @@ +{ + "name": "example-with-tailwindcss", + "type": "module", + "scripts": { + "dev": "vinxi dev", + "build": "vinxi build", + "start": "vinxi start" + }, + "dependencies": { + "@solidjs/router": "^0.14.1", + "@solidjs/start": "^1.0.6", + "autoprefixer": "^10.4.19", + "better-auth": "workspace:0.0.2-beta.8", + "postcss": "^8.4.38", + "solid-js": "^1.8.18", + "tailwindcss": "^3.4.3", + "vinxi": "^0.4.1" + }, + "engines": { + "node": ">=18" + } +} diff --git a/dev/solidjs/postcss.config.cjs b/dev/solidjs/postcss.config.cjs new file mode 100644 index 0000000000..33ad091d26 --- /dev/null +++ b/dev/solidjs/postcss.config.cjs @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/dev/solidjs/public/favicon.ico b/dev/solidjs/public/favicon.ico new file mode 100644 index 0000000000..fb282da071 Binary files /dev/null and b/dev/solidjs/public/favicon.ico differ diff --git a/dev/solidjs/src/app.css b/dev/solidjs/src/app.css new file mode 100644 index 0000000000..867b3508ff --- /dev/null +++ b/dev/solidjs/src/app.css @@ -0,0 +1,20 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +:root { + --background-rgb: 214, 219, 220; + --foreground-rgb: 0, 0, 0; +} + +@media (prefers-color-scheme: dark) { + :root { + --background-rgb: 0, 0, 0; + --foreground-rgb: 255, 255, 255; + } +} + +body { + background: rgb(var(--background-rgb)); + color: rgb(var(--foreground-rgb)); +} diff --git a/dev/solidjs/src/app.tsx b/dev/solidjs/src/app.tsx new file mode 100644 index 0000000000..00d69f5867 --- /dev/null +++ b/dev/solidjs/src/app.tsx @@ -0,0 +1,19 @@ +import { Router } from "@solidjs/router"; +import { FileRoutes } from "@solidjs/start/router"; +import { Suspense } from "solid-js"; +import Nav from "~/components/Nav"; +import "./app.css"; + +export default function App() { + return ( + ( + <> + {props.children} + + )} + > + + + ); +} diff --git a/dev/solidjs/src/components/Counter.tsx b/dev/solidjs/src/components/Counter.tsx new file mode 100644 index 0000000000..c4c9912940 --- /dev/null +++ b/dev/solidjs/src/components/Counter.tsx @@ -0,0 +1,13 @@ +import { createSignal } from "solid-js"; + +export default function Counter() { + const [count, setCount] = createSignal(0); + return ( + + ); +} diff --git a/dev/solidjs/src/components/Nav.tsx b/dev/solidjs/src/components/Nav.tsx new file mode 100644 index 0000000000..5bd0a7835f --- /dev/null +++ b/dev/solidjs/src/components/Nav.tsx @@ -0,0 +1,19 @@ +import { useLocation } from "@solidjs/router"; + +export default function Nav() { + const location = useLocation(); + const active = (path: string) => + path == location.pathname ? "border-sky-600" : "border-transparent hover:border-sky-600"; + return ( + + ); +} diff --git a/dev/solidjs/src/entry-client.tsx b/dev/solidjs/src/entry-client.tsx new file mode 100644 index 0000000000..0ca4e3c300 --- /dev/null +++ b/dev/solidjs/src/entry-client.tsx @@ -0,0 +1,4 @@ +// @refresh reload +import { mount, StartClient } from "@solidjs/start/client"; + +mount(() => , document.getElementById("app")!); diff --git a/dev/solidjs/src/entry-server.tsx b/dev/solidjs/src/entry-server.tsx new file mode 100644 index 0000000000..401eff83fd --- /dev/null +++ b/dev/solidjs/src/entry-server.tsx @@ -0,0 +1,21 @@ +// @refresh reload +import { createHandler, StartServer } from "@solidjs/start/server"; + +export default createHandler(() => ( + ( + + + + + + {assets} + + +
{children}
+ {scripts} + + + )} + /> +)); diff --git a/dev/solidjs/src/global.d.ts b/dev/solidjs/src/global.d.ts new file mode 100644 index 0000000000..dc6f10c226 --- /dev/null +++ b/dev/solidjs/src/global.d.ts @@ -0,0 +1 @@ +/// diff --git a/dev/solidjs/src/lib/auth.ts b/dev/solidjs/src/lib/auth.ts new file mode 100644 index 0000000000..31211a051c --- /dev/null +++ b/dev/solidjs/src/lib/auth.ts @@ -0,0 +1,15 @@ +import { betterAuth } from "better-auth"; +import { github } from "better-auth/social-providers"; + +export const auth = betterAuth({ + database: { + provider: "sqlite", + url: "./db.sqlite", + }, + socialProvider: [ + github({ + clientId: process.env.GITHUB_CLIENT_ID as string, + clientSecret: process.env.GITHUB_CLIENT_SECRET as string, + }), + ], +}); diff --git a/dev/solidjs/src/lib/client.ts b/dev/solidjs/src/lib/client.ts new file mode 100644 index 0000000000..1179f4a635 --- /dev/null +++ b/dev/solidjs/src/lib/client.ts @@ -0,0 +1,2 @@ +import { createAuthClient } from "better-auth/solid"; +export const client = createAuthClient(); diff --git a/dev/solidjs/src/routes/[...404].tsx b/dev/solidjs/src/routes/[...404].tsx new file mode 100644 index 0000000000..03e9484e69 --- /dev/null +++ b/dev/solidjs/src/routes/[...404].tsx @@ -0,0 +1,25 @@ +import { A } from "@solidjs/router"; + +export default function NotFound() { + return ( +
+

Not Found

+

+ Visit{" "} + + solidjs.com + {" "} + to learn how to build Solid apps. +

+

+ + Home + + {" - "} + + About Page + +

+
+ ); +} diff --git a/dev/solidjs/src/routes/about.tsx b/dev/solidjs/src/routes/about.tsx new file mode 100644 index 0000000000..1321ac3cdf --- /dev/null +++ b/dev/solidjs/src/routes/about.tsx @@ -0,0 +1,25 @@ +import { A } from "@solidjs/router"; +import Counter from "~/components/Counter"; + +export default function About() { + return ( +
+

About Page

+ +

+ Visit{" "} + + solidjs.com + {" "} + to learn how to build Solid apps. +

+

+ + Home + + {" - "} + About Page +

+
+ ); +} diff --git a/dev/solidjs/src/routes/api/auth/*auth.ts b/dev/solidjs/src/routes/api/auth/*auth.ts new file mode 100644 index 0000000000..8666b416ce --- /dev/null +++ b/dev/solidjs/src/routes/api/auth/*auth.ts @@ -0,0 +1,4 @@ +import { auth } from "~/lib/auth"; +import { toSolidStartHandler } from "better-auth/solid-start"; + +export const { GET, POST } = toSolidStartHandler(auth); diff --git a/dev/solidjs/src/routes/index.tsx b/dev/solidjs/src/routes/index.tsx new file mode 100644 index 0000000000..ce01ac54d0 --- /dev/null +++ b/dev/solidjs/src/routes/index.tsx @@ -0,0 +1,31 @@ +import { client } from "~/lib/client"; + + +export default function Home() { + const session = client.useSession() + return ( +
+ { + session() ?
+

+ {session()?.user.name} +

+

+ {session()?.user.email} +

+ +
: + } +
+ ); +} diff --git a/dev/solidjs/tailwind.config.cjs b/dev/solidjs/tailwind.config.cjs new file mode 100644 index 0000000000..14d3e24e3b --- /dev/null +++ b/dev/solidjs/tailwind.config.cjs @@ -0,0 +1,8 @@ +/** @type {import('tailwindcss').Config} */ +module.exports = { + content: ["./src/**/*.{html,js,jsx,ts,tsx}"], + theme: { + extend: {} + }, + plugins: [] +}; diff --git a/dev/solidjs/tsconfig.json b/dev/solidjs/tsconfig.json new file mode 100644 index 0000000000..3ad477f77c --- /dev/null +++ b/dev/solidjs/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "ESNext", + "module": "ESNext", + "moduleResolution": "bundler", + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "jsx": "preserve", + "jsxImportSource": "solid-js", + "allowJs": true, + "noEmit": true, + "strict": true, + "types": ["vinxi/types/client"], + "isolatedModules": true, + "paths": { + "~/*": ["./src/*"] + } + } +} diff --git a/dev/svelte/.gitignore b/dev/svelte/.gitignore new file mode 100644 index 0000000000..79518f7164 --- /dev/null +++ b/dev/svelte/.gitignore @@ -0,0 +1,21 @@ +node_modules + +# Output +.output +.vercel +/.svelte-kit +/build + +# OS +.DS_Store +Thumbs.db + +# Env +.env +.env.* +!.env.example +!.env.test + +# Vite +vite.config.js.timestamp-* +vite.config.ts.timestamp-* diff --git a/dev/svelte/.npmrc b/dev/svelte/.npmrc new file mode 100644 index 0000000000..b6f27f1359 --- /dev/null +++ b/dev/svelte/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/dev/svelte/README.md b/dev/svelte/README.md new file mode 100644 index 0000000000..5ce676612e --- /dev/null +++ b/dev/svelte/README.md @@ -0,0 +1,38 @@ +# create-svelte + +Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/main/packages/create-svelte). + +## Creating a project + +If you're seeing this, you've probably already done this step. Congrats! + +```bash +# create a new project in the current directory +npm create svelte@latest + +# create a new project in my-app +npm create svelte@latest my-app +``` + +## Developing + +Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: + +```bash +npm run dev + +# or start the server and open the app in a new browser tab +npm run dev -- --open +``` + +## Building + +To create a production version of your app: + +```bash +npm run build +``` + +You can preview the production build with `npm run preview`. + +> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/dev/svelte/db.sqlite b/dev/svelte/db.sqlite new file mode 100644 index 0000000000..2396d8fdef Binary files /dev/null and b/dev/svelte/db.sqlite differ diff --git a/dev/svelte/package.json b/dev/svelte/package.json new file mode 100644 index 0000000000..8bb34bcb98 --- /dev/null +++ b/dev/svelte/package.json @@ -0,0 +1,25 @@ +{ + "name": "svelte", + "version": "0.0.1", + "private": true, + "scripts": { + "dev": "vite dev --port 3000", + "build": "vite build", + "preview": "vite preview", + "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", + "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch" + }, + "devDependencies": { + "@sveltejs/adapter-auto": "^3.0.0", + "@sveltejs/kit": "^2.0.0", + "@sveltejs/vite-plugin-svelte": "^3.0.0", + "svelte": "^4.2.7", + "svelte-check": "^3.6.0", + "typescript": "^5.0.0", + "vite": "^5.0.3" + }, + "type": "module", + "dependencies": { + "better-auth": "workspace:0.0.2-beta.8" + } +} \ No newline at end of file diff --git a/dev/svelte/src/app.d.ts b/dev/svelte/src/app.d.ts new file mode 100644 index 0000000000..743f07b2e5 --- /dev/null +++ b/dev/svelte/src/app.d.ts @@ -0,0 +1,13 @@ +// See https://kit.svelte.dev/docs/types#app +// for information about these interfaces +declare global { + namespace App { + // interface Error {} + // interface Locals {} + // interface PageData {} + // interface PageState {} + // interface Platform {} + } +} + +export {}; diff --git a/dev/svelte/src/app.html b/dev/svelte/src/app.html new file mode 100644 index 0000000000..77a5ff52c9 --- /dev/null +++ b/dev/svelte/src/app.html @@ -0,0 +1,12 @@ + + + + + + + %sveltekit.head% + + +
%sveltekit.body%
+ + diff --git a/dev/svelte/src/hooks.server.ts b/dev/svelte/src/hooks.server.ts new file mode 100644 index 0000000000..bec86f40c1 --- /dev/null +++ b/dev/svelte/src/hooks.server.ts @@ -0,0 +1,6 @@ +import { auth } from "$lib/auth"; +import { svelteKitHandler } from "better-auth/svelte-kit"; + +export async function handle({ event, resolve }) { + return svelteKitHandler({ event, resolve, auth }); +} diff --git a/dev/svelte/src/lib/auth.ts b/dev/svelte/src/lib/auth.ts new file mode 100644 index 0000000000..1bb842ae64 --- /dev/null +++ b/dev/svelte/src/lib/auth.ts @@ -0,0 +1,16 @@ +import { env } from "$env/dynamic/private"; +import { betterAuth } from "better-auth"; +import { github } from "better-auth/social-providers"; + +export const auth = betterAuth({ + database: { + provider: "sqlite", + url: "./db.sqlite", + }, + socialProvider: [ + github({ + clientId: env.GITHUB_CLIENT_ID, + clientSecret: env.GITHUB_CLIENT_SECRET, + }), + ], +}); diff --git a/dev/svelte/src/lib/client.ts b/dev/svelte/src/lib/client.ts new file mode 100644 index 0000000000..c94ea55125 --- /dev/null +++ b/dev/svelte/src/lib/client.ts @@ -0,0 +1,7 @@ +import { createAuthClient } from "better-auth/svelte"; +import { organization } from "better-auth/client"; + +export const client = createAuthClient({ + baseURL: "http://localhost:3000/api/auth", + authPlugins: [organization], +}); diff --git a/dev/svelte/src/lib/index.ts b/dev/svelte/src/lib/index.ts new file mode 100644 index 0000000000..856f2b6c38 --- /dev/null +++ b/dev/svelte/src/lib/index.ts @@ -0,0 +1 @@ +// place files you want to import through the `$lib` alias in this folder. diff --git a/dev/svelte/src/routes/+page.svelte b/dev/svelte/src/routes/+page.svelte new file mode 100644 index 0000000000..9b900ffe49 --- /dev/null +++ b/dev/svelte/src/routes/+page.svelte @@ -0,0 +1,79 @@ + + +
+
+
+ {#if $session} +
+

+ {$session?.user.name} +

+

+ {$session?.user.email} +

+ +
+ {:else} + + {/if} +
+
+
+ + diff --git a/dev/svelte/static/favicon.png b/dev/svelte/static/favicon.png new file mode 100644 index 0000000000..825b9e65af Binary files /dev/null and b/dev/svelte/static/favicon.png differ diff --git a/dev/svelte/svelte.config.js b/dev/svelte/svelte.config.js new file mode 100644 index 0000000000..4a82086e24 --- /dev/null +++ b/dev/svelte/svelte.config.js @@ -0,0 +1,18 @@ +import adapter from '@sveltejs/adapter-auto'; +import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; + +/** @type {import('@sveltejs/kit').Config} */ +const config = { + // Consult https://kit.svelte.dev/docs/integrations#preprocessors + // for more information about preprocessors + preprocess: vitePreprocess(), + + kit: { + // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. + // If your environment is not supported, or you settled on a specific environment, switch out the adapter. + // See https://kit.svelte.dev/docs/adapters for more information about adapters. + adapter: adapter() + } +}; + +export default config; diff --git a/dev/svelte/tsconfig.json b/dev/svelte/tsconfig.json new file mode 100644 index 0000000000..fc93cbd940 --- /dev/null +++ b/dev/svelte/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./.svelte-kit/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "checkJs": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "resolveJsonModule": true, + "skipLibCheck": true, + "sourceMap": true, + "strict": true, + "moduleResolution": "bundler" + } + // Path aliases are handled by https://kit.svelte.dev/docs/configuration#alias + // except $lib which is handled by https://kit.svelte.dev/docs/configuration#files + // + // If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes + // from the referenced tsconfig.json - TypeScript does not merge them in +} diff --git a/dev/svelte/vite.config.ts b/dev/svelte/vite.config.ts new file mode 100644 index 0000000000..6b9eb5d390 --- /dev/null +++ b/dev/svelte/vite.config.ts @@ -0,0 +1,6 @@ +import { sveltekit } from "@sveltejs/kit/vite"; +import { defineConfig } from "vite"; + +export default defineConfig({ + plugins: [sveltekit()], +}); diff --git a/packages/better-auth/package.json b/packages/better-auth/package.json index 2f51ac7fc6..a230aaa41e 100644 --- a/packages/better-auth/package.json +++ b/packages/better-auth/package.json @@ -29,6 +29,10 @@ "./solid": "./dist/solid.js", "./vue": "./dist/vue.js", "./plugins": "./dist/plugins.js", + "./svelte-kit": "./dist/svelte-kit.js", + "./solid-start": "./dist/solid-start.js", + "./svelte": "./dist/svelte.js", + "./next-js": "./dist/next-js.js", "./package.json": "./package.json" }, "devDependencies": { @@ -42,6 +46,7 @@ "hono": "^4.5.4", "listhen": "^1.7.2", "react": "^18.3.1", + "solid-js": "^1.8.18", "swr": "^2.2.5", "tsup": "^8.2.4", "type-fest": "^4.24.0", diff --git a/packages/better-auth/src/api/routes/sign-in.ts b/packages/better-auth/src/api/routes/sign-in.ts index 5d8d0032e5..0d912f6c34 100644 --- a/packages/better-auth/src/api/routes/sign-in.ts +++ b/packages/better-auth/src/api/routes/sign-in.ts @@ -37,6 +37,12 @@ export const signInOAuth = createAuthEndpoint( (p) => p.id === c.body.provider, ); if (!provider) { + c.context.logger.error( + "Provider not found. Make sure to add the provider to your auth config", + { + provider: c.body.provider, + }, + ); throw new APIError("NOT_FOUND"); } const cookie = c.context.authCookies; diff --git a/packages/better-auth/src/client/base.ts b/packages/better-auth/src/client/base.ts index 2d31191f27..7ce5275857 100644 --- a/packages/better-auth/src/client/base.ts +++ b/packages/better-auth/src/client/base.ts @@ -31,10 +31,7 @@ export const createAuthClient = ( /** * used for plugins only */ - const $baseFetch = createFetch({ - ...options, - baseURL: getBaseURL(options?.baseURL).withPath, - }); + const $baseFetch = createFetch(); const $fetch = createFetch({ method: "GET", ...options, diff --git a/packages/better-auth/src/client/create-client-plugin.ts b/packages/better-auth/src/client/create-client-plugin.ts index 16626933ba..ecfd6bcfaf 100644 --- a/packages/better-auth/src/client/create-client-plugin.ts +++ b/packages/better-auth/src/client/create-client-plugin.ts @@ -15,6 +15,7 @@ export const createClientPlugin = () => { react?: (useStore: typeof reactStore) => Record; vue?: (useStore: typeof vueStore) => Record; preact?: (useStore: typeof preactStore) => Record; + svelte?: () => Record; }, >( $fn: ($fetch: BetterFetch) => { diff --git a/packages/better-auth/src/client/solid.ts b/packages/better-auth/src/client/solid.ts new file mode 100644 index 0000000000..84d6259a75 --- /dev/null +++ b/packages/better-auth/src/client/solid.ts @@ -0,0 +1,17 @@ +import type { ClientOptions } from "./type"; +import { createAuthClient as createClient } from "./base"; +import { useStore } from "@nanostores/solid"; +import type * as SolidJS from "solid-js"; //to fix ts error: This is likely not portable. A type annotation is necessary. +export const createAuthClient =