fix: async SecureStore token read + prod env fallback
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,7 +18,7 @@ export const authClient = createAuthClient({
|
||||
},
|
||||
auth: {
|
||||
type: "Bearer",
|
||||
token: () => SecureStore.getItem(TOKEN_KEY) ?? "",
|
||||
token: async () => (await SecureStore.getItemAsync(TOKEN_KEY)) ?? "",
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
|
||||
4
packages/env/src/native.ts
vendored
4
packages/env/src/native.ts
vendored
@@ -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,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user