question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to redirect router when User logout?

See original GitHub issue

I want to redirect router when user logout. Example I have

Currently I stay at  
// admin/event
when click logout it will go to
// '/'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
arunodacommented, Jul 29, 2015

How you handle the logout code. If you are using Meteor.logout you can do this:

Meteor.logout(function() {
  FlowRouter.go('/');
});
2reactions
soulmachinecommented, Nov 20, 2016

@ldong the URL in the browser doesn’t change if you use FlowRouter.go('/'), however, FlowRouter.redirect('/') works well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Redirect on Login and Logout - SST.Dev
Redirect the user to the homepage after they login. And redirect them back to the login page after they logout. We are going...
Read more >
How to Router Redirect After Login - Pluralsight
In this guide, we are going to learn how to redirect a user after a ... 2export const LOGOUT = "LOGOUT"; 3 4export...
Read more >
reactjs - How to correctly redirect after the user clicked logout
just need to use redirect after the admin decided to click on the logout button without using usehistory. const Admin = () =>...
Read more >
Redirect Users After Logout - Auth0
You can redirect users to a specific URL after they logout. You will need to register the redirect URL in your tenant or...
Read more >
Redirect on Login and Logout - Serverless Stack - Netlify
Redirect the user to the homepage after they login. And redirect them back to the login page after they logout. We are going...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found