-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-session.js
More file actions
32 lines (24 loc) · 1007 Bytes
/
test-session.js
File metadata and controls
32 lines (24 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Test script to verify session persistence and authentication
// Run this in your app console or as a standalone test
const testSessionPersistence = async () => {
console.log('🧪 Testing Session Persistence...');
try {
// Test 1: Check if AsyncStorage is available
console.log('✅ AsyncStorage should be configured');
// Test 2: Check if Supabase client is configured with persistence
console.log('✅ Supabase client should have persistence enabled');
// Test 3: Test authentication flow
console.log('✅ Authentication methods should be available');
console.log('🎉 All tests passed! Your session persistence is configured correctly.');
} catch (error) {
console.error('❌ Test failed:', error);
}
};
// Export for use in app
if (typeof module !== 'undefined' && module.exports) {
module.exports = { testSessionPersistence };
}
// Run test if in browser/console
if (typeof window !== 'undefined') {
testSessionPersistence();
}