Aziz
Aziz
BABetter Auth
Created by EgeOnder on 3/4/2025 in #help
[1.2.2] Type error with Expo client plugin
What is the expected better-fetch version?
38 replies
BABetter Auth
Created by EgeOnder on 3/4/2025 in #help
[1.2.2] Type error with Expo client plugin
It could be a bun issue, lemme try npm or yarn
38 replies
BABetter Auth
Created by EgeOnder on 3/4/2025 in #help
[1.2.2] Type error with Expo client plugin
Tried that, still have this issue
38 replies
BABetter Auth
Created by EgeOnder on 3/4/2025 in #help
[1.2.2] Type error with Expo client plugin
Nope, these are the only two packages declared in my package.json:
@better-auth/expo@^1.2.5
better-auth@^1.2.5
@better-auth/expo@^1.2.5
better-auth@^1.2.5
But I do see different versions of better-fetch in my bun.lock
38 replies
BABetter Auth
Created by EgeOnder on 3/4/2025 in #help
[1.2.2] Type error with Expo client plugin
Packages: @better-auth/[email protected] [email protected]
38 replies
BABetter Auth
Created by EgeOnder on 3/4/2025 in #help
[1.2.2] Type error with Expo client plugin
now on 1.2.5 having similar type errors:
import { MMKV, Mode } from "react-native-mmkv";

import { createAuthClient } from "better-auth/react";
import { expoClient } from "@better-auth/expo/client";
import { Platform } from "react-native";

export const authStorage = new MMKV({
id: "auth-storage",
mode: Mode.MULTI_PROCESS,
});

export const authClient = createAuthClient({
baseURL: process.env.EXPO_PUBLIC_API_BASE_URL,
scheme: process.env.EXPO_PUBLIC_APP_SCHEME,
plugins: [
expoClient({ <-- "type 'Promise<string | undefined> is not assignable to type 'string | (() => string | undefined) | undefined"
scheme: process.env.EXPO_PUBLIC_APP_SCHEME,
storagePrefix: "auth",
storage: {
getItem: (key) => authStorage.getString(key) ?? null,
setItem: (key, value) => authStorage.set(key, value),
},
}),
],
});
import { MMKV, Mode } from "react-native-mmkv";

import { createAuthClient } from "better-auth/react";
import { expoClient } from "@better-auth/expo/client";
import { Platform } from "react-native";

export const authStorage = new MMKV({
id: "auth-storage",
mode: Mode.MULTI_PROCESS,
});

export const authClient = createAuthClient({
baseURL: process.env.EXPO_PUBLIC_API_BASE_URL,
scheme: process.env.EXPO_PUBLIC_APP_SCHEME,
plugins: [
expoClient({ <-- "type 'Promise<string | undefined> is not assignable to type 'string | (() => string | undefined) | undefined"
scheme: process.env.EXPO_PUBLIC_APP_SCHEME,
storagePrefix: "auth",
storage: {
getItem: (key) => authStorage.getString(key) ?? null,
setItem: (key, value) => authStorage.set(key, value),
},
}),
],
});
38 replies
BABetter Auth
Created by Cody on 3/16/2025 in #help
Server session untyped
I have the same issue, it’s still unresolved for me, we manually typed it and moved on for now
9 replies
BABetter Auth
Created by _Zaizen_ on 2/4/2025 in #help
useSession cannot reach get-session endpoint
If you move better-auth’s route to be the first it should work
46 replies
BABetter Auth
Created by _Zaizen_ on 2/4/2025 in #help
useSession cannot reach get-session endpoint
So the static plugin catches “/“, and handles the rest of the route,
46 replies
BABetter Auth
Created by _Zaizen_ on 2/4/2025 in #help
useSession cannot reach get-session endpoint
It’s probably Elysia’s route matching. If you use “/“, it’ll match that first no?
46 replies
BABetter Auth
Created by _Zaizen_ on 2/4/2025 in #help
useSession cannot reach get-session endpoint
Is your deployed backend and frontend on different URLs?
46 replies
BABetter Auth
Created by _Zaizen_ on 2/4/2025 in #help
useSession cannot reach get-session endpoint
What’s your createAuthClient setup look like?
46 replies
BABetter Auth
Created by Json 👺 on 2/1/2025 in #help
Has anyone used getSession() with tRPC callers?
No worries, I just manually typed it for now just to unblock myself
14 replies