Question:
I am currently writing a auth system for a fourm I am making, but I cannot figure out how to log the user out. Is there a way to log the user out while using Replit Auth?
//This is what I have for the coder right now, what do I need to add or remove
// To make this work
app.get('/logout', (req, res) => {
user = getUserInfo(req);
user.logout();
res.send("Logged Out");
})
You could clear the cookie of the page (if there is not a built-in function.) If your page doesn’t store any other cookies besides ReplAuth, then I think you could just redirect to a page that runs