alpha
Login
or
Join now
atpota.to
/
cred.blue
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
This repository has no description
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
tweak log out
author
damedotblog
date
1 year ago
(Apr 2, 2025, 4:34 PM -0400)
commit
e41afa97
e41afa97efdbff21456cba877178f27b2acde3ad
parent
c1696059
c16960596e6507f4ade127a955986bfba3f376f0
+9
-2
1 changed file
Expand all
Collapse all
Unified
Split
src
contexts
AuthContext.js
+9
-2
src/contexts/AuthContext.js
Reviewed
···
43
43
44
44
// Initialize the client and check for existing sessions
45
45
const result = await oauthClient.init();
46
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
86
-
if (!client || !session) return;
87
87
+
if (!client || !session) {
88
88
+
console.log('No client or session available for logout'); // Debug log
89
89
+
return;
90
90
+
}
87
91
88
92
try {
89
89
-
await client.signOut(session.sub);
93
93
+
console.log('Attempting logout with client:', client); // Debug log
94
94
+
// Instead of using client methods, we'll just clear the session
90
95
setSession(null);
96
96
+
// Clear any stored tokens or session data
97
97
+
localStorage.removeItem('atproto_session');
91
98
} catch (err) {
92
99
console.error('Logout failed:', err);
93
100
setError(err.message);