-
-
Save pavan5208/9cef5180d61be8ea12e44c20631010b7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun createNewUser(email: String, password: String) { | |
auth.createUserWithEmailAndPassword(email, password) | |
.addOnCompleteListener(this) { task -> | |
if (task.isSuccessful) { | |
// Sign in success, update UI with the signed-in user's information | |
val user = auth.currentUser | |
Toast.makeText( | |
baseContext, "Authentication Success.", | |
Toast.LENGTH_SHORT | |
).show() | |
startHomeActivity() | |
} else { | |
// If sign in fails, display a message to the user. | |
Toast.makeText( | |
baseContext, "Authentication failed.", | |
Toast.LENGTH_SHORT | |
).show() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment