refactor: update OTP system to support user-specific verification tables with legacy encryption and multi-role authentication.
This commit is contained in:
@@ -159,7 +159,17 @@ class HmacAuthMiddleware
|
||||
->where('api_key', $apiKey)
|
||||
->first();
|
||||
|
||||
return $admin;
|
||||
if ($admin) return $admin;
|
||||
|
||||
// Check service customers/employees (users table)
|
||||
$serviceUser = DB::connection('primary')
|
||||
->table('users')
|
||||
->select('id as user_id', 'api_secret')
|
||||
->selectRaw("'service_user' as user_type")
|
||||
->where('api_key', $apiKey)
|
||||
->first();
|
||||
|
||||
return $serviceUser;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user