This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

tweak log out

+9 -2
+9 -2
src/contexts/AuthContext.js
··· 43 43 44 44 // Initialize the client and check for existing sessions 45 45 const result = await oauthClient.init(); 46 + console.log('OAuth client initialized:', oauthClient); // Debug log 46 47 setClient(oauthClient); 47 48 48 49 if (result?.session) { ··· 83 84 84 85 // Logout the user 85 86 const logout = async () => { 86 - if (!client || !session) return; 87 + if (!client || !session) { 88 + console.log('No client or session available for logout'); // Debug log 89 + return; 90 + } 87 91 88 92 try { 89 - await client.signOut(session.sub); 93 + console.log('Attempting logout with client:', client); // Debug log 94 + // Instead of using client methods, we'll just clear the session 90 95 setSession(null); 96 + // Clear any stored tokens or session data 97 + localStorage.removeItem('atproto_session'); 91 98 } catch (err) { 92 99 console.error('Logout failed:', err); 93 100 setError(err.message);