IFDS Group Interview Question

What is a way to perform authentication in JavaScript?