Fix jwt-token

This commit is contained in:
2025-09-14 09:53:47 +02:00
parent 674c2e2d8f
commit ed51786903
2 changed files with 13 additions and 0 deletions

View File

@@ -204,10 +204,13 @@ router.post('/local', async (req, res, next) => {
try {
// Determine tenant
const tenantId = await multiAuth.determineTenant(req);
console.log('🔍 Determined tenant for login:', tenantId);
const authConfig = await multiAuth.getTenantAuthConfig(tenantId);
console.log('🔍 Auth config for tenant:', authConfig);
// Verify tenant supports local authentication
if (authConfig.type !== 'local') {
console.log('🔍 Tenant does not support local auth:', authConfig.type);
return res.status(400).json({
success: false,
message: `This tenant uses ${authConfig.type} authentication. Please use the appropriate login method.`,