Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

208
Views
How to logout a user and clear passport session as admin?

So I have an authentication based on passport that uses local strategy and Redis for session storage. I know that when a user wants to log out himself, a logout API can be provided like this:

router.post('/logout', (req, res) => {
    req.logout(null, () => {
        res.send("logged out");
    });
});

But is there a way to log the user out as the website admin? Maybe by deleting redis directly? But how can I get the corresponding user key?

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!