Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@wajahatkarim3
Created January 31, 2021 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wajahatkarim3/785774184ed8d8242766653cc169f0f2 to your computer and use it in GitHub Desktop.
Save wajahatkarim3/785774184ed8d8242766653cc169f0f2 to your computer and use it in GitHub Desktop.
Firebase Authentication
var auth = FirebaseAuth.getInstance()
auth.createUserWithEmailAndPassword(bi.txtEmail.text.toString(), bi.txtPassword.text.toString())
.addOnCompleteListener { task ->
if (task.isSuccessful) {
var firebaseUser = auth.currentUser
// CometChat Auth will be here.
} else {
Snackbar.make(bi.root, "Authentication failed!", Snackbar.LENGTH_SHORT).show()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment