3

我正在尝试接收具有类似于以下有效负载的 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 仪表板中访问类似的端点。

4

0 回答 0