-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
2 - S (<= 1 week)
-
4972
Currently there are two different objects being used for registering and login. There should be a shim around login which would allow for a simple object to be used for auth instead of a specific Realm.Credentials object. That way this code:
// Register try{ app.emailPasswordAuth.registerUser({email, password}); } // Login const creds = Realm.Credentials.emailPassword(email, password); await app.logIn(creds);
could be simplified to:
const creds = {email, password}
app.emailPasswordAuth.registerUser(creds);
await app.logIn(creds);