- Harness: kintex-mobile-dev agent + kintex-mobile-orchestrator skill (WISE mobile ref, Stitch-first design rule, dual app targets B2B/B2C) - design.md v2.1: full 84-screen inventory (web 51 / admin 10 / public 8 / mobile 15) with Stitch prompts incl. ticketing (SCR-P7/P8, M14/M15) - PLANNING v3.1: unified account + split signup tracks (2FA required for staff, light signup/guest for visitors), one codebase / two app targets - Deliverables: dev plan (21s), user/operator/developer guides (17/14/15s), program spec (44s, 65 programs, 8 flowcharts), DA (DB design 14s + table spec xlsx 35 tables/299 cols) - Benchmark: ticketing-app-benchmark.md (7 apps) -> IMPLEMENTATION_BACKLOG Phase F (14 items) - Stitch: 23 generated screens saved (mobile 10, admin 6, web core 5, ticket 2) - mobile/: Expo scaffold (SDK 51, expo-router, secure store JWT) - frontend: SCR-13~17 QA fixes, icons.tsx, kintexEvents, V10 seed migration - ci/: KINTEX CI logo assets Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
45 lines
1.4 KiB
TypeScript
45 lines
1.4 KiB
TypeScript
/*
|
|
* 안전 저장소 래퍼 — JWT는 expo-secure-store(네이티브 keychain/keystore)에 저장.
|
|
* 웹/미지원 플랫폼은 AsyncStorage로 폴백. 비밀번호는 절대 저장하지 않는다.
|
|
* "아이디 기억"(이메일)은 비민감 정보이므로 AsyncStorage 사용.
|
|
*/
|
|
import * as SecureStore from 'expo-secure-store';
|
|
import AsyncStorage from '@react-native-async-storage/async-storage';
|
|
import { Platform } from 'react-native';
|
|
|
|
const useSecure = Platform.OS !== 'web';
|
|
|
|
export async function secureSet(key: string, value: string): Promise<void> {
|
|
if (useSecure) {
|
|
await SecureStore.setItemAsync(key, value);
|
|
} else {
|
|
await AsyncStorage.setItem(key, value);
|
|
}
|
|
}
|
|
|
|
export async function secureGet(key: string): Promise<string | null> {
|
|
if (useSecure) {
|
|
return SecureStore.getItemAsync(key);
|
|
}
|
|
return AsyncStorage.getItem(key);
|
|
}
|
|
|
|
export async function secureDelete(key: string): Promise<void> {
|
|
if (useSecure) {
|
|
await SecureStore.deleteItemAsync(key);
|
|
} else {
|
|
await AsyncStorage.removeItem(key);
|
|
}
|
|
}
|
|
|
|
// 비민감 저장소 (아이디 기억 등)
|
|
export async function prefSet(key: string, value: string): Promise<void> {
|
|
await AsyncStorage.setItem(key, value);
|
|
}
|
|
export async function prefGet(key: string): Promise<string | null> {
|
|
return AsyncStorage.getItem(key);
|
|
}
|
|
export async function prefDelete(key: string): Promise<void> {
|
|
await AsyncStorage.removeItem(key);
|
|
}
|