Atlas App Services vs AuthJS (NextAuth) for User Authentication

I need to add authentication to my Next.js app. I’m already using Atlas App Services for data and have setup anonymous user authentication to access the GraphQL API from my app. Now I’d like to add user accounts to my app as well.

It seems that a lot of people choose to use AuthJS (formerly NextAuth) to integrate with and store user sessions in MongoDB. Is there a particular advantage to using AuthJS vs directly using user authentication in Atlas App Services via the Realm Web SDK?

Also, are there any good examples of authenticating to Atlas App Services from a Next.js application to get me started?

Thanks.