-
Notifications
You must be signed in to change notification settings - Fork 83
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
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
- Log in to the application successfully.
- Observe the “Sign-In Successful” toast appearing once (✅ expected).
- Open a new browser tab or switch to another tab.
- Return to the original tab.
- 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 issueMetadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers