Suddenly Getting 'Invalid Password'

I’m having trouble authenticating users. Before today I have had no problems logging in users I created via my localhost app (in dev).
With slight variations of username I have consistently used the same password. I have tried different uname/password combinations that are all more than 6 chars long, but I’m now unable to get past:

const user = await realmapp.logIn(credentials);

with valid credentials. To test registration of a new user the code logs in to the application
to avoid ‘pending’ status for new users with:

const loggedInNewUser = await realmapp.logIn(newUsercredentials);

The credentials must be valid otherwise this initial code based login wouldn’t succeed either, but it does.
So, I have same code, same credentials (checked in debugger immediately before sending), but
for a login (only) authentication fails with error:

Error: Request failed (POST<my-app>/auth/providers/
local-userpass/login): invalid username/password (status 401 Unauthorized)

err.errorCode: "InvalidPassword"

Nothing that I would expect to affect this functionality has changed in my code (anyway stashing latest changes and reverting to last commit, which was working, makes no difference).
I therefore believe it is a database related issue.

The failed login attempts are logged. But there is no associated information that gives a clue as to what is preventing the logins.

Starting out I had trouble configuring Custom User Data and had to create a separate


field, which was impractical from a design perspective and fundamentally confusing to work with. I removed that field so that I my custom User Id field is _id. This change is important to make the db usable and should not affect the ability to login, as it would not impact on login credentials(?).

Is there a way to check passwords in Atlas/Realm? What else am I missing? thanks …

Update - I have re-added the userid custom data field with the original codebase and the ‘Invalid password’ problem remains …