Files
bw-expo-app/lib/auth/client.ts
imeepos fe814bd403 🔧 config: 切换到生产环境 API
- 更新 API base URL 从测试环境到生产环境
- lib/api/client.ts: api-test.mixvideo.bowong.cc → api.mixvideo.bowong.cc
- lib/auth/client.ts: api-test.mixvideo.bowong.cc → api.mixvideo.bowong.cc

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 18:20:39 +08:00

27 lines
836 B
TypeScript

import { expoClient } from "@better-auth/expo/client";
import { stripeClient } from "@bowong/better-auth-stripe/client";
import { usernameClient } from "better-auth/client/plugins";
import { createAuthClient } from "better-auth/react";
import { storage } from '../storage';
export const authClient = createAuthClient({
baseURL: "https://api.mixvideo.bowong.cc/api/auth",
fetchOptions: {
credentials: "omit",
auth: {
type: 'Bearer',
token: () => storage.getItem(`bestaibest.better-auth.session_token`) || ``
}
},
plugins: [
expoClient({
scheme: "bestaibestwebapp",
storagePrefix: "bestaibest",
storage: storage,
}),
usernameClient(),
stripeClient({ subscription: true }),
],
});
export const { signIn, signUp, signOut, useSession, $Infer, subscription } = authClient;