React native React Native-GoogleSignIn-refreshToken、idToken、accessTokenExpirationDate均为空

React native React Native-GoogleSignIn-refreshToken、idToken、accessTokenExpirationDate均为空,react-native,oauth,openid,google-signin,refresh-token,React Native,Oauth,Openid,Google Signin,Refresh Token,我正在尝试在我的项目中使用expo google登录。我可以使用GoogleSignIn.signInAsync()登录,但在我返回的对象中,refreshToken、idToken和accessTokenExpirationDate都为空。有人知道问题出在哪里吗?我使用expo 4.2.1。我已弹出该项目,并使用react native run android运行该项目 这是我的密码: import React from 'react'; import { View, Button } fro

我正在尝试在我的项目中使用expo google登录。我可以使用GoogleSignIn.signInAsync()登录,但在我返回的对象中,refreshToken、idToken和accessTokenExpirationDate都为空。有人知道问题出在哪里吗?我使用expo 4.2.1。我已弹出该项目,并使用react native run android运行该项目

这是我的密码:

import React from 'react';
import { View, Button } from 'react-native';
import * as GoogleSignIn from 'expo-google-sign-in';

export default function App() {
  return (
    <View>
      <Button title='sign in' onPress={async () => {
        await GoogleSignIn.initAsync({
          clientId: '<MY CLIENT ID>',
          scopes: [
            GoogleSignIn.SCOPES.OPEN_ID
          ],
        });
        const r = await GoogleSignIn.signInAsync();
        console.log(JSON.stringify(r));
      }}/>
    </View>
  );
}
}

同样奇怪的是,结果中的scopes字段不包含openid

这些是我在谷歌云控制台中的凭证(SHA1指纹来自debug.keystore)

同意设置


提前感谢

您是否能够解决此问题?我遇到了同样的问题,但不知道该怎么办。。。
{
"type": "success",
"user": {
    "uid": "8978924659847365874563486867",
    "email": "john.bar@gmail.com",
    "displayName": "John Bar",
    "photoURL": "https://lh3.googleusercontent.com/a-/AjsgdyegdrR-_wluyiuBUUKDKWBUWYDKUWGHDjO-M",
    "firstName": "John",
    "lastName": "Bar",
    "auth": {
        "idToken": null,
        "refreshToken": null,
        "accessToken": "ya29.a0AfH6SMCh1K322dfdf34rff6_gGHW98-kIngxBUUTtfRZTugtwff4f4wf4f4wf4fPib9fc2JPXmg7ewfGx7peVtC4ffwfw4fwfw4fw4fBeFkqJydbWxcwiUb",
        "accessTokenExpirationDate": null
    },
    "scopes": [
        "https://www.googleapis.com/auth/userinfo.profile",
        "https://www.googleapis.com/auth/userinfo.email"
    ],
    "serverAuthCode": null
}