Realm React-Native SDK -> callResetPasswordFunction not working

Hi, I’m having tremendous struggles getting the passwordResetFunction to work properly…

app.emailPasswordAuth.callResetPasswordFunction({email, password});
results in the following
[Error: resetDetails must be of type ‘object’, got (joe.jasper@example.com)]

I’ve tried every-which-way, debugger open and closed, multiple variations, using the recently deprecated calls without resetDetails to no avail…

any guidance from the community or Realm team would be GREATLY appreciated,

thank you!

1 Like

Hello David,

Welcome to the MonogDB Community!

And so just to make sure that I am understanding the problem that you are dealing with, you are trying to establish a password reset function by using:

callResetPasswordFunction(resetDetails, args)Promise<void>
Resets the password of an email identity using the password reset function set up in the application.

Parameters:
resetDetails
The email and password details to reset

email
Type: string
The email address of the user.

password
Type: string
The desired new password.

args repeatable
Type: [BSON, ...]
Arguments passed onto the function.

Returns: Promise<void>

Found here correct? I am simply confirming to make sure that I am identifying the correct roadblock that you are experiencing.

If so, I will look into this for you and get back to you with the correct means of execution for this function.

Regards,

Brock

Hi,

I came across this issue as well and am posting the solution here for others as it was difficult to find.

This is an issue that was fixed in realm-js version 10.11, so updating to any version after that should solve it.