Initial commit for Greenlens

This commit is contained in:
Timo Knuth
2026-03-16 21:31:46 +01:00
parent 307135671f
commit 05d4f6e78b
573 changed files with 54233 additions and 1891 deletions

View File

@@ -0,0 +1,17 @@
import * as SecureStore from 'expo-secure-store';
const SESSION_KEY = 'greenlens_session_v3';
export const getAuthToken = async (): Promise<string> => {
try {
const raw = await SecureStore.getItemAsync(SESSION_KEY);
if (raw) {
const session = JSON.parse(raw);
if (typeof session?.token === 'string' && session.token) {
return session.token;
}
}
} catch {}
// Return 'guest' instead of throwing to allow guest mode
return 'guest';
};