Skip to main content

Register Users

When you have enabled the email/password authentication provider in your Realm App, you can register a new account from client code.

Register a New User Account​

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}")
}