Docs Menu

Register Users - Kotlin SDK

On this page

  • Register a New User Account

When you have enabled the email/password provider in your Realm app, you can register a new account, confirm an email address, and reset a user's password from client code.

To register a new user, pass a user-provided email and password to app.emailPasswordAuth.registerUser():

val app: App = App.create(YOUR_APP_ID)
runBlocking {
app.emailPasswordAuth.registerUser(email, password)
// once registered, you can log in with the user credentials
val user = app.login(Credentials.emailPassword(email, password))
Log.v("Successfully logged in ${user.identity}")
}
←  Connect to a MongoDB Realm Backend App - Kotlin SDKAuthenticate Users - Kotlin SDK →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.