IFDS Group interview question

What is a way to perform authentication in JavaScript?