rust - Firebase failing to authenticate token - Stack Overflow

I'm using Firebase on my front-end to register a user, then sending the token to the backend to sy

I'm using Firebase on my front-end to register a user, then sending the token to the backend to sync it with my back-end database. I have the following simple snippet:

let _result: FirebaseUser = FirebaseAuth::new("my-project").await.verify(token)
                                .map_err(|err| Error::msg(format!("{err}")))?;

Where token is sent from the front-end. This worked about a week ago, but now running the exact same code, gives an InvalidToken error. base64 decoding the token, I get:

{"alg":"RS256","kid":"30b221ab65617bcf87ee0f8462f74e36522ca2e4","typ":"JWT"}(various data)

So it seems like the token is correct. My device is also set as a google provider with the json credentials (I did this while debugging, but the issue persisted). The token is also brand new, generated with a new registered user.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744233413a4564361.html

相关推荐

  • rust - Firebase failing to authenticate token - Stack Overflow

    I'm using Firebase on my front-end to register a user, then sending the token to the backend to sy

    8天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信