Skip to content

Commit c8094ae

Browse files
nearestnaborsclaude
andcommitted
Fix: sync username to persistent state on auth verification
The username was stored in /tmp/assa-auth-state.json but not synced to ~/.config/assa/state.json when auth was verified from cache. This caused x_conversations to fail with "I need your X username" even though auth was successful. Now verifyCachedAuth() calls setPersistentUsername() to ensure the username is always synced to the persistent state file. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 9dc89bc commit c8094ae

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/arcade/client.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,8 @@ async function verifyCachedAuth(): Promise<{
313313
try {
314314
await executeTool("X.LookupSingleUserByUsername", { username: "x" });
315315
log("Auth verified, using cached username:", `@${authenticatedUsername}`);
316+
// Sync username to persistent state (in case it wasn't saved before)
317+
setPersistentUsername(authenticatedUsername);
316318
return { authorized: true, username: authenticatedUsername };
317319
} catch (error) {
318320
log(

0 commit comments

Comments
 (0)