XThomasBU commited on
Commit
fb4e3a5
·
verified ·
1 Parent(s): 2c9925f

Create logout.html

Browse files
Files changed (1) hide show
  1. logout.html +21 -0
logout.html ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Logout</title>
5
+ <script>
6
+ window.onload = function() {
7
+ fetch('/chainlit_tutor/logout', {
8
+ method: 'POST',
9
+ credentials: 'include' // Ensure cookies are sent
10
+ }).then(() => {
11
+ window.location.href = '/';
12
+ }).catch(error => {
13
+ console.error('Logout failed:', error);
14
+ });
15
+ };
16
+ </script>
17
+ </head>
18
+ <body>
19
+ <p>Logging out... If you are not redirected, <a href="/">click here</a>.</p>
20
+ </body>
21
+ </html>