Skip to content

Commit 4d42269

Browse files
committed
feat(api): redirect on logout
1 parent 8818bf6 commit 4d42269

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/routes/auth/logout.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,15 @@ module.exports.get = fastify => ({
2020
path: '/',
2121
sameSite: 'Strict',
2222
secure: false,
23-
}).send('The token has been revoked.');
23+
});
24+
res.header('Content-Type', 'text/html');
25+
return res.send(`
26+
<!DOCTYPE html>
27+
<html>
28+
<head><meta http-equiv="refresh" content="0; url='/'"></head>
29+
<body></body>
30+
</html>
31+
`);
2432
},
2533
onRequest: [fastify.authenticate],
2634
});

0 commit comments

Comments
 (0)