如何将Firebase身份验证令牌用于YouTube API访问令牌

时间:2020-01-01 22:09:22

标签: firebase react-native youtube-data-api react-native-firebase

我正在使用React本机应用程序,并且想对YouTube API使用Firebase身份验证令牌。

firebase.auth().signInWithEmailAndPassword(
    credentials.email,
    credentials.password
   ).then( ()=>{})

实现此目标的正确方法是什么?

1 个答案:

答案 0 :(得分:0)

Firebase Auth令牌是JWT,它不是可用于Youtube API的有效OAuth2令牌。如果要访问youtube,则必须使用其documented authentication flow分别登录。