React 原生谷歌登录正在请求谷歌驱动器权限



我用谷歌登录制作了一个应用程序,但谷歌要求谷歌云端硬盘权限。 如何在应用中移除谷歌云端硬盘权限? 我不想显示一个要求谷歌云端硬盘权限的弹出窗口。

firebaseGoogleLogin = async () => {
try {
// add any configuration settings here:
await GoogleSignin.hasPlayServices();
const userInfo = await GoogleSignin.signIn();
this.setState({ userInfo: userInfo, loggedIn: true });
// create a new firebase credential with the token
const credential = firebase.auth.GoogleAuthProvider.credential(userInfo.idToken, userInfo.accessToken)
// login with credential
const firebaseUserCredential = await firebase.auth().signInWithCredential(credential);
} catch (error) {
console.log(error)
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
// user cancelled the login flow
} else if (error.code === statusCodes.IN_PROGRESS) {
// operation (f.e. sign in) is in progress already
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
// play services not available or outdated
} else {
// some other error happened
}
}
}

我遇到了同样的问题,我意识到您必须从谷歌配置方法中删除范围属性。

GoogleSignin.configure({
scopes: ['https://www.googleapis.com/auth/drive.readonly'], // what API you want to access on behalf of the user, default is email and profile
webClientId: '--------------- your web client id ---------',
});

最新更新