Skip to content
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

fix: logout #604

Merged
merged 2 commits into from
Jan 22, 2025
Merged

fix: logout #604

merged 2 commits into from
Jan 22, 2025

Conversation

abdou6666
Copy link
Member

@abdou6666 abdou6666 commented Jan 22, 2025

Motivation

This PR addresses the issue when users logs out, the dashboard displays for a second then page refreshes and logs out the user

Fixes #594

Type of change:

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my own code

frontend/src/contexts/auth.context.tsx Dismissed Show dismissed Hide dismissed
onSuccess: async () => {
queryClient.removeQueries([CURRENT_USER_KEY]);
await logoutRedirection();
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this minor suggestion

Suggested change
},
onError: (error) => {
toast.error(t("message.logout_failed"));
}
},

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IkbelTalebHssan good idea i'll address it in different PR

Copy link
Collaborator

@IkbelTalebHssan IkbelTalebHssan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀
The issue is fixed like shown in the screenshots 👏
Screencast from 01-22-2025 11:04:27 AM.webm
Screencast from 01-22-2025 11:02:37 AM.webm

Copy link
Contributor

@marrouchi marrouchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏

@marrouchi marrouchi merged commit 2d05357 into main Jan 22, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When clicking on "Logout", sometimes the user doesn't get disconnected
3 participants