Environment
Expo CLI 2.7.1 environment info:
System:
OS: macOS 10.14
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 10.13.0 - /usr/local/bin/node
Yarn: 1.3.2 - /usr/local/bin/yarn
npm: 6.4.1 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
IDEs:
Android Studio: 3.1 AI-173.4819257
Xcode: 10.1/10B61 - /usr/bin/xcodebuild
npmGlobalPackages:
expo-cli: 2.6.11
Target iOS
Package.json
{
"name": "my-new-project",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject",
"test": "node ./node_modules/jest/bin/jest.js --watchAll"
},
"jest": {
"preset": "jest-expo"
},
"dependencies": {
"@expo/samples": "2.1.1",
"expo": "^32.0.0",
"native-base": "^2.10.0",
"react": "16.5.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-32.0.0.tar.gz",
"react-navigation": "^2.18.2",
"react-redux": "^5.1.1",
"redux": "^4.0.1",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-preset-expo": "^5.0.0",
"eslint": "^5.8.0",
"eslint-plugin-prettier": "^3.0.0",
"eslint-plugin-react": "^7.11.1",
"jest-expo": "^31.0.0",
"prettier": "^1.15.2"
}
}
Steps to reproduce
Here’s a fragment of the code :
import { Google, Constants } from 'expo'
async function authWithGoogle() {
const result = await Google.logInAsync({
behavior: Constants.appOwnership !== 'standalone' ? 'web' : 'system',
iosClientId: GOOGLE_IOS_CLIENT_ID,
scopes: ['profile', 'email']
})
console.log(result)
}
Expected behavior
A web based view should appear with google auth page.
Actual behavior
During an attempt to use Expo’s Google authentication integration an error is shown: Cannot read property “OAuthRedirect” of undefined.
Everything was running fine until I updated the SDK to v32. I did everything according to official guidelines.
I also tried to remove node_modules
and reinstall them back again.
Thanks for your help!