-
Notifications
You must be signed in to change notification settings - Fork 447
fix: Ensure logout clears both Firebase auth and API key #5274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
When logging out via the avatar dropdown, the logout function was only clearing Firebase authentication but not the stored API key. This could leave users partially authenticated with their API key still active. Updated CurrentUserPopover to use handleSignOut from useCurrentUser composable, which properly handles both authentication methods: - Clears API key if logged in with API key - Signs out Firebase if logged in with Firebase This ensures complete logout regardless of authentication method. Fixes #5261 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
🎭 Playwright Test Results✅ All tests passed across all browsers! ⏰ Completed at: 08/31/2025, 12:49:43 AM UTC 📊 Test Reports by Browser🎉 Your tests are passing across all browsers! |
🎨 Storybook Build Status⏳ Build is starting... ⏰ Started at: 08/31/2025, 12:26:17 AM UTC 🚀 Building Storybook
⏱️ Please wait while the Storybook build is in progress... |
🎨 Storybook Build Status⏳ Build is starting... ⏰ Started at: 08/31/2025, 12:22:57 AM UTC 🚀 Building Storybook
⏱️ Please wait while the Storybook build is in progress... |
Updated test mocks to include handleSignOut from useCurrentUser composable and adjusted test expectations to verify handleSignOut is called instead of the direct logout method. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
christian-byrne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice work
* fix: Ensure logout clears both Firebase auth and API key When logging out via the avatar dropdown, the logout function was only clearing Firebase authentication but not the stored API key. This could leave users partially authenticated with their API key still active. Updated CurrentUserPopover to use handleSignOut from useCurrentUser composable, which properly handles both authentication methods: - Clears API key if logged in with API key - Signs out Firebase if logged in with Firebase This ensures complete logout regardless of authentication method. Fixes #5261 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * test: Update CurrentUserPopover tests to match new logout implementation Updated test mocks to include handleSignOut from useCurrentUser composable and adjusted test expectations to verify handleSignOut is called instead of the direct logout method. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
Summary
CurrentUserPopovercomponent to use the correct logout handlerProblem
When logging out via the avatar dropdown in the top right, the logout function was only clearing Firebase authentication but not the stored API key. This could leave users partially authenticated with their API key still active after appearing to log out.
Solution
Updated
CurrentUserPopover.vueto usehandleSignOutfrom theuseCurrentUsercomposable instead of directly callingauthActions.logout(). ThehandleSignOutmethod properly handles both authentication methods:This ensures complete logout regardless of authentication method.
Console commands to verify auth state:
Fixes #5261
🤖 Generated with Claude Code
┆Issue is synchronized with this Notion page by Unito