简体   繁体   English

多少次 Firebase Auth 在 UserCredentail.additionalUserInfo.?isNewUser 中考虑新用户或非新用户?

[英]how much times Firebase Auth takes to consider a user that is new or not in the UserCredentail.additionalUserInfo!.isNewUser?

I have this block of code:我有这段代码:

  final cred = await FirebaseAuth.instance.signInWithEmailAndPassword(
    email: email,
    password: password,
  );
  print(cred.additionalUserInfo!.isNewUser);

as you see, it's a sign-in usual method from the Firebase auth.如您所见,这是来自 Firebase 身份验证的登录常用方法。

in the cred.additionalUserInfo..isNewUser , it seems it returns a bool based on of the user is new or not.cred.additionalUserInfo..isNewUser中,它似乎根据用户是否是新用户返回一个布尔值。

but what's the date range that it considers a user is new or not, I mean how long the Auth service takes to say that the user is now not new?但是它认为用户是新用户的日期范围是多少,我的意思是 Auth 服务需要多长时间才能说用户现在不是新用户?

I checked it's documentation from the API and all I found is:我从 API 检查了它的文档,我发现的是:

Whether the user account has been recently created.最近是否创建了用户帐户。

and it doesn't give details about how much time it takes so the user is not new!而且它没有提供有关需要多少时间的详细信息,因此用户不是新用户!

Simply, when you sign in with an email for the first time isNewUser = true .简单地说,当您第一次使用 email 登录时, isNewUser = true

Otherwise isNewUser = false否则isNewUser = false

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM