firebase - Flutter Firebase Auth登录日志在没有用户登录的情况下触发
问题描述
正如标题所说,当我的应用程序运行时,我看到了奇怪的日志。我得到的第一个是
W/BiChannelGoogleApi( 3072): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@36d7eba
W/DynamiteModule( 3072): Local module descriptor class for com.google.firebase.auth not found.
I/FirebaseAuth( 3072): [FirebaseAuth:] Loading module via FirebaseOptions.
I/FirebaseAuth( 3072): [FirebaseAuth:] Preparing to create service connection to gms implementation
D/FirebaseAuth( 3072): Notifying id token listeners about user ( *useridhere* ).
D/FirebaseApp( 3072): Notifying auth state listeners.
D/FirebaseApp( 3072): Notified 1 auth state listeners.
然后稍后我得到
I/FirebaseAuth( 3072): [FirebaseAuth:] Loading module via FirebaseOptions.
I/FirebaseAuth( 3072): [FirebaseAuth:] Preparing to create service connection to gms implementation
这是我所期望的所有正常日志,所以我很好奇这是否会导致任何问题?确实看起来不太对。
编辑:
为了清楚起见,立即登录后我得到
W/DynamiteModule( 3072): Local module descriptor class for com.google.firebase.auth not found.
W/BiChannelGoogleApi( 3072): [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@36d7eba
W/DynamiteModule( 3072): Local module descriptor class for com.google.firebase.auth not found.
I/FirebaseAuth( 3072): [FirebaseAuth:] Loading module via FirebaseOptions.
I/FirebaseAuth( 3072): [FirebaseAuth:] Preparing to create service connection to gms implementation
D/FirebaseAuth( 3072): Notifying id token listeners about user ( *useridhere*).
D/FirebaseAuth( 3072): Notifying auth state listeners about user ( *useridhere* ).
D/FirebaseApp( 3072): Notifying auth state listeners.
D/FirebaseApp( 3072): Notified 1 auth state listeners.
我知道这是正常的。但是,这发生在应用程序运行的中间,这似乎不正常
解决方案
当您启动使用 Firebase 身份验证的应用时,它会自动尝试重新验证之前登录的用户。在这种情况下,似乎还有一个监听器来监听身份验证状态的变化(可能是 FlutterFire 本身),然后 Firebase 身份验证客户端会通知身份验证状态。
推荐阅读
- python - Plotly:如何根据悬停检索的值编辑文本输出?
- javascript - jquery - 如何在元素的 id 中与类元素交互
- google-bigquery - Google BI Engine 与 Data Studio 性能比较
- machine-learning - 如何将一个模型的中间层传递给另一个模型以在 PyTorch 中跳过连接
- angular - 构建后配置角度生产文件
- mysql - 根据开始和结束时间每分钟显示一行
- python - 如何将 mel_spectrogram 转换回音频?
- python - 从字典创建不同的数据框
- algorithm - Latex 算法环境 float.sty 未找到
- html - Bootstrap 4 模态背景