MongoDB Realm Node.js SDK, Logging In A Use

Hello. I am currently in the process in implementing email/password authentication using MongoDB Realm’s Node.js SDK.

I have implemented user registration & email confirmation, but I am having trouble with .Credentials and .logIn.

From what I understand I need to pass .Credentials an object with two fields: username and password. I then pass the value outputted by .Credentials to .logIn(), and the user should be logged in.

Well I have been trying and failing to do this for several hours. I re-written my resolver over and over again, gone over the docs, and tried to replicate several code examples.

Can anyone provide an overview of how how .Credentials and .logIn works and a code example of it implemented?

Also, are there any other resources that might help me implementing other features of Realm? The docs are a little out of date and so are the videos.

Edit:
I am trying to better understand Realm, and whether it is the right fit for my use case. All that I want is user authentication and it’s related features. I don’t want to store anything other than User/Account data in Realm. The “Quick Start” section for the Node.js SDK documentation is all about opening realms, defining object models, and basic CRUD operations. I don’t want to do this. I am defining my schema and performing CRUD operations with Mongoose connected to an Atlas cluster.

Given my limited intended use case, does it make sense to use Realm? I am trying to follow the docs to setup user authentication, but I’m confused about the actual requirements for email/password authentication using Realm.