Skip to content

Bug Report: “Signed in!” Toast Reappears When Switching Tabs #171

@DecodeX15

Description

@DecodeX15

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

🐞 Bug Report: “Sign-In Successful” Toast Reappears When Switching Tabs

📌 Issue Overview

After logging in, the user correctly sees the “Sign-In Successful” toast once.
However, when switching between browser tabs or reopening the same tab, the toast message reappears multiple times — even though the user session is already active.

This does not happen when navigating within the website using internal routes.
The issue only occurs when switching or reopening browser tabs.


🔍 Steps to Reproduce

  1. Log in to the application successfully.
  2. Observe the “Sign-In Successful” toast appearing once (✅ expected).
  3. Open a new browser tab or switch to another tab.
  4. Return to the original tab.
  5. The same “Sign-In Successful” toast appears again repeatedly.

🎯 Expected Behavior

The “Sign-In Successful” toast should appear only once, immediately after successful login —
and should not reappear when switching or reopening browser tabs.


🚨 Actual Behavior

The toast notification reappears every time the user switches back to the tab,
causing confusion and unnecessary repetition for authenticated users.


💡 Suggested Improvements

  • Before showing the success toast, check if the user is already authenticated (via cookies, localStorage, or session state).
  • Only trigger the toast when a new sign-in event occurs, not when the page gains focus again.

Example logic:

if (!toastShown && isAuthenticated) {
  showToast("Sign-In Successful");
  setToastShown(true);
}

###  🖼️ Screenshot / Screen Recording

https://github.com/user-attachments/assets/a63fccc2-8034-4b94-af1d-bdd183e17a05

### Record

- [x] I agree to follow this project's Code of Conduct
- [x] I want to work on this issue

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions