Fix jwt-token
This commit is contained in:
@@ -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.`,
|
||||
|
||||
Reference in New Issue
Block a user