mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 02:51:14 +00:00
feat(core): Allow enforcement of MFA usage on instance (#16556)
Co-authored-by: Marc Littlemore <marc@n8n.io> Co-authored-by: Csaba Tuncsik <csaba.tuncsik@gmail.com>
This commit is contained in:
@@ -58,7 +58,11 @@ function createAgent(
|
||||
if (withRestSegment) void agent.use(prefix(REST_PATH_SEGMENT));
|
||||
|
||||
if (options?.auth && options?.user) {
|
||||
const token = Container.get(AuthService).issueJWT(options.user, browserId);
|
||||
const token = Container.get(AuthService).issueJWT(
|
||||
options.user,
|
||||
options.user.mfaEnabled,
|
||||
browserId,
|
||||
);
|
||||
agent.jar.setCookie(`${AUTH_COOKIE_NAME}=${token}`);
|
||||
}
|
||||
return agent;
|
||||
|
||||
Reference in New Issue
Block a user