mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 12:47:35 +01:00
Add error handling to auto login
This commit is contained in:
parent
51014e7a8d
commit
153638c2cd
10
server.js
10
server.js
@ -263,10 +263,14 @@ app.get('/login', async (request, response) => {
|
||||
return response.redirect('/');
|
||||
}
|
||||
|
||||
const autoLogin = await userModule.tryAutoLogin(request);
|
||||
try {
|
||||
const autoLogin = await userModule.tryAutoLogin(request);
|
||||
|
||||
if (autoLogin) {
|
||||
return response.redirect('/');
|
||||
if (autoLogin) {
|
||||
return response.redirect('/');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Error during auto-login:', error);
|
||||
}
|
||||
|
||||
return response.sendFile('login.html', { root: path.join(process.cwd(), 'public') });
|
||||
|
Loading…
x
Reference in New Issue
Block a user