且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Firebase身份验证令牌使用js列出用户博客

更新时间:2023-12-05 23:16:34

Firebase身份验证ID令牌是JWT.Blogger需要OAuth 2令牌,而Firebase身份验证令牌则不需要.

A Firebase Authentication ID token is a JWT. Blogger expects an OAuth 2 token, which the Firebase Authentication token isn't.

虽然可以在Firebase中基于OAuth令牌创建ID令牌,但相反的操作是不可能的.您必须改为使用OAuth 2提供程序登录用户,然后将那个令牌传递给博客.

While it is possible within Firebase to create an ID Token based on an OAuth token, the reverse isn't possible. You will have to sign in the user with an OAuth 2 provider instead, and pass that token to blogger.