接收有效负载中带有firebase的OAuth承载令牌

接收有效负载中带有firebase的OAuth承载令牌,firebase,oauth-2.0,oauth,retool,Firebase,Oauth 2.0,Oauth,Retool,我正在尝试接收一个OAuth令牌,其有效负载如下所示: name John Jones iss https://securetoken.google.com/some-app-name aud some-app-name auth_time 1608697332 user_id some-user-id sub some-sub iat 1608412332 exp 1608342932 email some@email.com email_verifie

我正在尝试接收一个OAuth令牌,其有效负载如下所示:

  name John Jones
  iss https://securetoken.google.com/some-app-name
  aud some-app-name
  auth_time 1608697332
  user_id some-user-id
  sub some-sub
  iat 1608412332
  exp 1608342932
  email some@email.com
  email_verified true
  firebase
    identities
      google.com
         111342112511016950980
      email
         some@email.com
    sign_in_provider google.com
重要的部分是
firebase
部分。我遇到的问题是,我在使用oauth后收到的承载令牌缺少firebase部分。这是我得到的有效载荷:

  iss https://accounts.google.com
  azp 1234.apps.googleusercontent.com
  aud 1234.apps.googleusercontent.com
  sub 163433232345016954635
  hd some.hd
  email some@email.com
  email_verified true
  at_hash f643f839471pxJ0gCsA
  name John Jones
  given_name John
  family_name Jones
  locale en
  iat 1601116597
  exp 1607510197
我使用以下设置接收具有上述有效负载的承载令牌:

Callback URL: https://oauth.retool.com/oauth/user/oauthcallback
Authorization URL: https://accounts.google.com/o/oauth2/auth
Access Token URL: https://oauth2.googleapis.com/token
Client ID: *****-*****.apps.googleusercontent.com
Client Secret: *********
Scope: profile email
我的问题是,我需要什么设置或范围才能获得负载中带有firebase的承载令牌


为了获得更多信息,我在retool中运行了这个工具,以便能够检索一个承载令牌,用于对具有身份验证保护的graphql服务器的请求。该防护是firebase防护(它检查是否为有效的firebase用户)。我共享的第一个有效负载来自客户端web应用程序生成的承载令牌,我们希望在我们的retool仪表板中访问类似的端点。

遇到同样的问题,你能解决这个问题吗?没有,我没能解决,最后我做了其他事情。我没有使用oauth,而是通过firebase库让用户登录。我将firebase依赖项添加到retool中,并使用它来获取firebase oauth令牌:``const idToken=wait firebase.auth().signInWithEmailAndPassword(emailInput.value,passwordInput.value)。然后({user}=>user.getIdToken())。然后(id=>{return id;})“``我们能够通过一个自定义流获得它:Google OAuth,保存idToken,modal(由于ReTool中的时间问题而需要),Firebase Rest请求从第一步使用OAuth令牌登录。保存Firebase步骤中的承载令牌并用于验证原始资源。听起来你找到了解决办法,但这可能会帮助下一个人。模式步骤没有任何作用,我很确定它只是作为一个占位符,在firebase回调过程中延迟重新工具处理。