mirror of
				https://github.com/NodeBB/NodeBB.git
				synced 2025-10-31 11:05:54 +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; | 		return result; | ||||||
| 	} catch (err) { | 	} catch (err) { | ||||||
| 		if (err.message === 'A valid login session was not found. Please log in and try again.') { | 		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) => { | 			return confirm('[[error:api.reauth-required]]', (ok) => { | ||||||
| 				if (ok) { | 				if (ok) { | ||||||
| 					ajaxify.go('login'); | 					ajaxify.go(url); | ||||||
| 				} | 				} | ||||||
| 			}); | 			}); | ||||||
| 		} | 		} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user