This commit is contained in:
2026-03-29 10:26:38 -05:00
parent 05d4f6e78b
commit b1c99893a6
1628 changed files with 67782 additions and 60143 deletions

View File

@@ -1,17 +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';
};
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';
};