Firebase anonymous sign in returns a task (which is basically Google promise implementation):
val task:Task<AuthResult> = FirebaseAuth.getInstance().signInAnonymously()
How it would be possible create a signInAnonymous
wrapper where:
这是一个
suspend
函数,等待task
完成-
它返回一个
Deferred
对象,异步传递结果fun signInAnonymous() : Deferred