mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-29 18:16:17 +01:00
feat: new client-side hook to allow plugins to modify relogin url
This commit is contained in:
@@ -22,9 +22,10 @@ async function call(options, callback) {
|
||||
return result;
|
||||
} catch (err) {
|
||||
if (err.message === 'A valid login session was not found. Please log in and try again.') {
|
||||
const { url } = await fireHook('filter:admin.reauth', { url: 'login' });
|
||||
return confirm('[[error:api.reauth-required]]', (ok) => {
|
||||
if (ok) {
|
||||
ajaxify.go('login');
|
||||
ajaxify.go(url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user