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: {
|
auth: {
|
||||||
type: "Bearer",
|
type: "Bearer",
|
||||||
token: () => SecureStore.getItem(TOKEN_KEY) ?? "",
|
token: async () => (await SecureStore.getItemAsync(TOKEN_KEY)) ?? "",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|||||||
4
packages/env/src/native.ts
vendored
4
packages/env/src/native.ts
vendored
@@ -6,6 +6,8 @@ export const env = createEnv({
|
|||||||
client: {
|
client: {
|
||||||
EXPO_PUBLIC_SERVER_URL: z.url(),
|
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,
|
emptyStringAsUndefined: true,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user