Skip to content

Instantly share code, notes, and snippets.

@dllewellyn
Created July 2, 2020 07:58
Show Gist options
  • Save dllewellyn/b6ecb25020357ca1d6f86f51e8aa7c9c to your computer and use it in GitHub Desktop.
Save dllewellyn/b6ecb25020357ca1d6f86f51e8aa7c9c to your computer and use it in GitHub Desktop.
suspend fun SignInClient.suspendBeginSignInRequest(beginSignInRequest: BeginSignInRequest) :BeginSignInResult =
suspendCoroutine { continuation ->
beginSignIn(beginSignInRequest).addOnSuccessListener {
continuation.resume(it)
}
.addOnFailureListener {
continuation.resumeWithException(it)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment