-
Type: Bug
-
Resolution: Fixed
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: None
-
SDK FY21-Q3, SDK FY21-Q3.
-
3080
<!---
Questions: If you have questions about HOW TO use Realm, please ask on
StackOverflow: http://stackoverflow.com/questions/ask?tags=realm
We monitor the realm tag.
Feature Request: Just fill in the first two sections below.
Bugs: To help you as fast as possible with an issue please describe your issue
and the steps you have taken to reproduce it in as much detail as possible.
-->
Goals
I'm trying to execute a password reset using a custom password reset function in Realm.
Expected Results
I expected to have the password reset function called using the callResetPasswordFunction().
Actual Results
When executing callResetPasswordFunction(), the documentation dictates it be called with two arguments and TypeScript dictates that the function be called with three arguments. I've tried it both ways:
callResetPasswordFunction(email, password, [])
callResetPasswordFunction(email, password)
The resulting stack trace is:
Error: Invalid arguments: 4 expected, but 3 supplied. at /home/runner/PreciousPunyTechnicians/node_modules/realm/lib/em ail-password-auth-methods.js:44:37 at /home/runner/PreciousPunyTechnicians/node_modules/realm/lib/ut ils.js:33:13 at new Promise (<anonymous>) at promisify (/home/runner/PreciousPunyTechnicians/node_modules/r ealm/lib/utils.js:32:16) at EmailPasswordAuth.callResetPasswordFunction (/home/runner/Prec iousPunyTechnicians/node_modules/realm/lib/email-password-auth-method s.js:44:16) at /home/runner/PreciousPunyTechnicians/index.js:17:40 at Script.runInContext (vm.js:131:20) at Object.<anonymous> (/run_dir/interp.js:156:20) at Module._compile (internal/modules/cjs/loader.js:1133:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js: 1153:10)
Even if I go in and add the callbacks, more errors arise.
Steps to Reproduce
- Import Realm.
- Create a Realm App.
- Call callResetPasswordFunction().
Code Sample
https://repl.it/@timesync/PreciousPunyTechnicians
Version of Realm and Tooling
- Realm JS SDK Version: 10.0.0-beta.9
- Node or React Native: Node