FirebaseAdmin ASP.NET SDK中的将来时间戳发出的Firebase ID令牌错误 [英] Firebase ID token issued at future timestamp Error in FirebaseAdmin ASP.NET SDK
问题描述
我正在使用Ionic 3应用程序,在该应用程序中我已使用google firebase登录.因此,我需要在后端验证firebase令牌.我已经将 FirebaseAdmin (版本1.2.0 )插件用于验证令牌.
I am working on an Ionic 3 application where i have used google firebase for login. So, i needed to verify the firebase token in my back-end. I have used FirebaseAdmin(Version 1.2.0) plugin for verifying the token.
try
{
var firebaseAppInstance = FirebaseApp.GetInstance(firebaseAppName);
if (firebaseAppInstance == null)
{
firebaseAppInstance = FirebaseApp.Create(new AppOptions()
{
Credential = GoogleCredential.FromFile("firebase-servicekey.json")
}, firebaseAppName);
}
var decodedToken = await FirebaseAuth.GetAuth(firebaseAppInstance).VerifyIdTokenAsync(firebaseToken);
if (userId == decodedToken.Uid)
{
return true;
}
}
catch (Exception e)
{
return false;
}
但是,有时我会收到在将来的时间戳上发布的Firebase ID令牌错误.有时,我可以验证相同的firebase令牌而不会出现此错误.
But, sometimes i am getting Firebase ID token issued at future timestamp error. And sometimes, i could verify the same firebase token without this error.
有人可以指出我的问题吗?预先感谢.
Can anyone point me out what's the problem here? Thanks in advance.
推荐答案
问题已得到解决发行说明
The issue has been resolved here. Just need to update the new release of that package. Here is the release notes
这篇关于FirebaseAdmin ASP.NET SDK中的将来时间戳发出的Firebase ID令牌错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!