Credentials represent a login with a given login provider, and are used by the MongoDB Realm to verify the user and grant access. The
Credentials.Provider.EMAIL_PASSWORD
provider is enabled by default. All other providers must be enabled on MongoDB Realm to work.
Note that users wanting to login using Email/Password must register first using EmailPasswordAuth.registerUser(String, String)
.
Credentials are used the following way:
// Example
App app = new App("app-id");
Credentials credentials = Credentials.emailPassword("email", "password");
User user = app.loginAsync(credentials, new App.Callback<User>() {
\@Override
public void onResult(Result<User> result) {
if (result.isSuccess() {
handleLogin(result.get());
} else {
handleError(result.getError());
}
}
));
}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4