The user authentication is done through Next.js server actions mainly; you can do it using APIs as well.