UNPKG

nodebb-plugin-2factor

Version:

In addition to regular authentication via username/password or SSO, a second layer of security can be configured, permitting access only if:

13 lines (10 loc) 240 B
'use strict'; (async () => { const hooks = await app.require('hooks'); hooks.on('filter:admin.reauth', (data) => { if (config['2factor'].hasKey) { data.url = `/login/2fa?next=/${ajaxify.currentPage}`; } return data; }); })();