mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor: Add deprecation notice for basic auth and JWT auth (#6349)
This commit is contained in:
@@ -9,7 +9,7 @@ import { getLogger } from '@/Logger';
|
||||
import config from '@/config';
|
||||
import * as Db from '@/Db';
|
||||
import * as CrashJournal from '@/CrashJournal';
|
||||
import { inTest } from '@/constants';
|
||||
import { USER_MANAGEMENT_DOCS_URL, inTest } from '@/constants';
|
||||
import { CredentialTypes } from '@/CredentialTypes';
|
||||
import { CredentialsOverwrites } from '@/CredentialsOverwrites';
|
||||
import { initErrorHandling } from '@/ErrorReporting';
|
||||
@@ -83,6 +83,18 @@ export abstract class BaseCommand extends Command {
|
||||
);
|
||||
}
|
||||
|
||||
if (process.env.N8N_BASIC_AUTH_ACTIVE === 'true') {
|
||||
LoggerProxy.warn(
|
||||
`Basic auth has been deprecated and will be removed in a future version of n8n. For authentication, please consider User Management. To learn more: ${USER_MANAGEMENT_DOCS_URL}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (process.env.N8N_JWT_AUTH_ACTIVE === 'true') {
|
||||
LoggerProxy.warn(
|
||||
`JWT auth has been deprecated and will be removed in a future version of n8n. For authentication, please consider User Management. To learn more: ${USER_MANAGEMENT_DOCS_URL}`,
|
||||
);
|
||||
}
|
||||
|
||||
this.instanceId = this.userSettings.instanceId ?? '';
|
||||
await Container.get(PostHogClient).init(this.instanceId);
|
||||
await Container.get(InternalHooks).init(this.instanceId);
|
||||
|
||||
Reference in New Issue
Block a user