diff --git a/apps/native/src/lib/auth-client.ts b/apps/native/src/lib/auth-client.ts index eb792b5..28e43a4 100644 --- a/apps/native/src/lib/auth-client.ts +++ b/apps/native/src/lib/auth-client.ts @@ -18,7 +18,7 @@ export const authClient = createAuthClient({ }, auth: { type: "Bearer", - token: () => SecureStore.getItem(TOKEN_KEY) ?? "", + token: async () => (await SecureStore.getItemAsync(TOKEN_KEY)) ?? "", }, }, plugins: [ diff --git a/packages/env/src/native.ts b/packages/env/src/native.ts index 0799adf..395b869 100644 --- a/packages/env/src/native.ts +++ b/packages/env/src/native.ts @@ -6,6 +6,8 @@ export const env = createEnv({ client: { EXPO_PUBLIC_SERVER_URL: z.url(), }, - runtimeEnv: process.env, + runtimeEnv: { + EXPO_PUBLIC_SERVER_URL: process.env.EXPO_PUBLIC_SERVER_URL ?? "https://api.app-forge.dev", + }, emptyStringAsUndefined: true, });