我在Flutter中注册时遇到问题。据我了解,firebase注册后会自动登录用户。我想阻止此操作,因为必须在我的应用中确认每个用户。
我在其他主题中看到了此案例的解决方案,但IMO,在注册后调用注销不是一个好主意,因为我们需要执行其他步骤。注册后有没有可能以更漂亮的方式删除登录?
谢谢!
我在Flutter中注册时遇到问题。据我了解,firebase注册后会自动登录用户。我想阻止此操作,因为必须在我的应用中确认每个用户。
我在其他主题中看到了此案例的解决方案,但IMO,在注册后调用注销不是一个好主意,因为我们需要执行其他步骤。注册后有没有可能以更漂亮的方式删除登录?
谢谢!
After calling
createUserWithEmailAndPassword()
then you will have a currently logged in user, if you dont want any user to be logged in then callsignOut()
, and before callingsignOut()
store both email and password insharedpareference
. Then when the user enters the confirm code, you can also callsignInWithEmailAndPassword()
internally using the stored email and password从客户端Firebase身份验证SDK创建帐户会自动使该用户登录。无法阻止这种情况。
另请参阅: