Gatik AI interview question

How would you implement authentication in a backend API?