-
-
Save pavan5208/4ca9fbdbb9c35caef3d222d22ef6da3f 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
fun signInWithCustomToken(customToken: String) { | |
customToken?.let { | |
auth.signInWithCustomToken(it) | |
.addOnCompleteListener(this) { task -> | |
if (task.isSuccessful) { | |
// Sign in success, update UI with the signed-in user's information | |
val user = auth.currentUser | |
} 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