@AmyLee the right way to do mac authentication would be to use a solution like Freeradius or Cisco ISE (amongst others) depending on the budget you have, as they all cost something, either in terms of money or time. I'd say that it is better still to use certificates if your devices and infrastructure support it, though for us that is often not the case.
If my answer solves your problem please click Accept as Solution so others can benefit from it.