https://kotlinlang.org logo
s

SrikanthG

10/25/2017, 2:01 PM
How to Authenticate users with firebase user UID checkcode.setOnClickListener { val code = userverify!!.text.toString().trim() val currentUser = mAuth!!.currentUser val uid = currentUser!!.uid mDatabase = FirebaseDatabase.getInstance().reference .child("Users").child(uid) if (!TextUtils.isEmpty(code) && code != uid) { Toast.makeText(this, "Verification was Successfull" + "Please Login with Email and Passsword", Toast.LENGTH_LONG) .show() val intent = Intent(applicationContext, MainActivity::class.java) startActivity(intent) finish() } else { Toast.makeText(this, "Verification Failed", Toast.LENGTH_LONG) .show() }
stackoverflow 15