[skip ci] Initial commit — CodexBar Mobile Expo app

This commit is contained in:
2026-06-24 16:28:28 +02:00
parent 4f32782eaf
commit 0bcd95ee1b
30 changed files with 3562 additions and 141 deletions
+38
View File
@@ -0,0 +1,38 @@
import * as SecureStore from "expo-secure-store";
const KEYS = {
CODEX_AUTH: "codexbar_codex_auth",
CLAUDE_SESSION_KEY: "codexbar_claude_session_key",
} as const;
export async function saveCodexAuth(auth: {
accessToken: string;
accountId?: string;
}): Promise<void> {
await SecureStore.setItemAsync(KEYS.CODEX_AUTH, JSON.stringify(auth));
}
export async function loadCodexAuth(): Promise<{
accessToken: string;
accountId?: string;
} | null> {
const raw = await SecureStore.getItemAsync(KEYS.CODEX_AUTH);
if (!raw) return null;
return JSON.parse(raw) as { accessToken: string; accountId?: string };
}
export async function saveClaudeSessionKey(key: string): Promise<void> {
await SecureStore.setItemAsync(KEYS.CLAUDE_SESSION_KEY, key);
}
export async function loadClaudeSessionKey(): Promise<string | null> {
return SecureStore.getItemAsync(KEYS.CLAUDE_SESSION_KEY);
}
export async function clearCodexAuth(): Promise<void> {
await SecureStore.deleteItemAsync(KEYS.CODEX_AUTH);
}
export async function clearClaudeSessionKey(): Promise<void> {
await SecureStore.deleteItemAsync(KEYS.CLAUDE_SESSION_KEY);
}