Skip to content

Commit 7b683af

Browse files
committed
revert google login
1 parent 45c461f commit 7b683af

File tree

7 files changed

+20
-110
lines changed

7 files changed

+20
-110
lines changed

apps/WarriorHappy/app.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"expo": {
33
"name": "WarriorHappy",
44
"slug": "WarriorHappy",
5-
"version": "3.2.8",
5+
"version": "3.2.6",
66
"orientation": "portrait",
77
"icon": "./assets/images/icon.png",
88
"scheme": "myapp",

apps/WarriorHappy/ios/Podfile.lock

-37
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
PODS:
2-
- AppAuth (1.6.2):
3-
- AppAuth/Core (= 1.6.2)
4-
- AppAuth/ExternalUserAgent (= 1.6.2)
5-
- AppAuth/Core (1.6.2)
6-
- AppAuth/ExternalUserAgent (1.6.2):
7-
- AppAuth/Core
82
- boost (1.83.0)
93
- DoubleConversion (1.1.6)
104
- EXConstants (15.4.5):
@@ -13,10 +7,6 @@ PODS:
137
- ExpoModulesCore
148
- Expo (50.0.7):
159
- ExpoModulesCore
16-
- ExpoAdapterGoogleSignIn (11.0.0):
17-
- ExpoModulesCore
18-
- GoogleSignIn (~> 7.0)
19-
- React-Core
2010
- ExpoAppleAuthentication (6.3.0):
2111
- ExpoModulesCore
2212
- ExpoCrypto (12.8.1):
@@ -61,14 +51,6 @@ PODS:
6151
- ReactCommon/turbomodule/core (= 0.73.4)
6252
- fmt (6.2.1)
6353
- glog (0.3.5)
64-
- GoogleSignIn (7.0.0):
65-
- AppAuth (~> 1.5)
66-
- GTMAppAuth (< 3.0, >= 1.3)
67-
- GTMSessionFetcher/Core (< 4.0, >= 1.1)
68-
- GTMAppAuth (2.0.0):
69-
- AppAuth/Core (~> 1.6)
70-
- GTMSessionFetcher/Core (< 4.0, >= 1.5)
71-
- GTMSessionFetcher/Core (3.3.1)
7254
- hermes-engine (0.73.4):
7355
- hermes-engine/Pre-built (= 0.73.4)
7456
- hermes-engine/Pre-built (0.73.4)
@@ -1138,9 +1120,6 @@ PODS:
11381120
- React-Core
11391121
- RNFlashList (1.6.3):
11401122
- React-Core
1141-
- RNGoogleSignin (11.0.0):
1142-
- GoogleSignIn (~> 7.0)
1143-
- React-Core
11441123
- RNReanimated (3.7.1):
11451124
- glog
11461125
- RCT-Folly (= 2022.05.16.00)
@@ -1172,7 +1151,6 @@ DEPENDENCIES:
11721151
- EXConstants (from `../../../node_modules/expo-constants/ios`)
11731152
- EXFont (from `../../../node_modules/expo-font/ios`)
11741153
- Expo (from `../../../node_modules/expo`)
1175-
- "ExpoAdapterGoogleSignIn (from `../../../node_modules/@react-native-google-signin/google-signin/expo/ios`)"
11761154
- ExpoAppleAuthentication (from `../../../node_modules/expo-apple-authentication/ios`)
11771155
- ExpoCrypto (from `../../../node_modules/expo-crypto/ios`)
11781156
- ExpoFileSystem (from `../../../node_modules/expo-file-system/ios`)
@@ -1235,19 +1213,14 @@ DEPENDENCIES:
12351213
- ReactCommon/turbomodule/core (from `../../../node_modules/react-native/ReactCommon`)
12361214
- "RNCAsyncStorage (from `../../../node_modules/@react-native-async-storage/async-storage`)"
12371215
- "RNFlashList (from `../../../node_modules/@shopify/flash-list`)"
1238-
- "RNGoogleSignin (from `../../../node_modules/@react-native-google-signin/google-signin`)"
12391216
- RNReanimated (from `../../../node_modules/react-native-reanimated`)
12401217
- RNScreens (from `../../../node_modules/react-native-screens`)
12411218
- RNSVG (from `../../../node_modules/react-native-svg`)
12421219
- Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`)
12431220

12441221
SPEC REPOS:
12451222
trunk:
1246-
- AppAuth
12471223
- fmt
1248-
- GoogleSignIn
1249-
- GTMAppAuth
1250-
- GTMSessionFetcher
12511224
- libaom
12521225
- libavif
12531226
- libevent
@@ -1270,8 +1243,6 @@ EXTERNAL SOURCES:
12701243
:path: "../../../node_modules/expo-font/ios"
12711244
Expo:
12721245
:path: "../../../node_modules/expo"
1273-
ExpoAdapterGoogleSignIn:
1274-
:path: "../../../node_modules/@react-native-google-signin/google-signin/expo/ios"
12751246
ExpoAppleAuthentication:
12761247
:path: "../../../node_modules/expo-apple-authentication/ios"
12771248
ExpoCrypto:
@@ -1391,8 +1362,6 @@ EXTERNAL SOURCES:
13911362
:path: "../../../node_modules/@react-native-async-storage/async-storage"
13921363
RNFlashList:
13931364
:path: "../../../node_modules/@shopify/flash-list"
1394-
RNGoogleSignin:
1395-
:path: "../../../node_modules/@react-native-google-signin/google-signin"
13961365
RNReanimated:
13971366
:path: "../../../node_modules/react-native-reanimated"
13981367
RNScreens:
@@ -1403,13 +1372,11 @@ EXTERNAL SOURCES:
14031372
:path: "../../../node_modules/react-native/ReactCommon/yoga"
14041373

14051374
SPEC CHECKSUMS:
1406-
AppAuth: 3bb1d1cd9340bd09f5ed189fb00b1cc28e1e8570
14071375
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
14081376
DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953
14091377
EXConstants: 988aa430ca0f76b43cd46b66e7fae3287f9cc2fc
14101378
EXFont: f20669cb266ef48b004f1eb1f2b20db96cd1df9f
14111379
Expo: 1cf3922a9b26262b2556544d4defcecccd37d033
1412-
ExpoAdapterGoogleSignIn: ee39be2723cc5a39b3c01cb56d779831c975e17f
14131380
ExpoAppleAuthentication: 4fc9972356977f009911f2f3a5f56319c2a5b11b
14141381
ExpoCrypto: b6428f48599c007676dc81a9b5f72c07e62fdccc
14151382
ExpoFileSystem: a9273932e69a9a1e1a8d01b6ba895bb8294bbea2
@@ -1425,9 +1392,6 @@ SPEC CHECKSUMS:
14251392
FBReactNativeSpec: b5983e1ab92f2a059a712ab9267d661d8d0d9158
14261393
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
14271394
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
1428-
GoogleSignIn: b232380cf495a429b8095d3178a8d5855b42e842
1429-
GTMAppAuth: 99fb010047ba3973b7026e45393f51f27ab965ae
1430-
GTMSessionFetcher: 8a1b34ad97ebe6f909fb8b9b77fba99943007556
14311395
hermes-engine: b2669ce35fc4ac14f523b307aff8896799829fe2
14321396
libaom: 144606b1da4b5915a1054383c3a4459ccdb3c661
14331397
libavif: 84bbb62fb232c3018d6f1bab79beea87e35de7b7
@@ -1478,7 +1442,6 @@ SPEC CHECKSUMS:
14781442
ReactCommon: dcc65c813041388dead6c8b477444757425ce961
14791443
RNCAsyncStorage: 618d03a5f52fbccb3d7010076bc54712844c18ef
14801444
RNFlashList: 4b4b6b093afc0df60ae08f9cbf6ccd4c836c667a
1481-
RNGoogleSignin: fc408799f1990a12497a32f64280c0fe353ffcc1
14821445
RNReanimated: 68be24ba590b9136af90698bb01527387c8061da
14831446
RNScreens: 2b73f5eb2ac5d94fbd61fa4be0bfebd345716825
14841447
RNSVG: ba3e7232f45e34b7b47e74472386cf4e1a676d0a

apps/WarriorHappy/ios/WarriorHappy.xcodeproj/project.pbxproj

-4
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,11 @@
288288
inputPaths = (
289289
"${PODS_ROOT}/Target Support Files/Pods-WarriorHappy/Pods-WarriorHappy-resources.sh",
290290
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
291-
"${PODS_CONFIGURATION_BUILD_DIR}/GTMSessionFetcher/GTMSessionFetcher_Core_Privacy.bundle",
292-
"${PODS_CONFIGURATION_BUILD_DIR}/GoogleSignIn/GoogleSignIn.bundle",
293291
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
294292
);
295293
name = "[CP] Copy Pods Resources";
296294
outputPaths = (
297295
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
298-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GTMSessionFetcher_Core_Privacy.bundle",
299-
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/GoogleSignIn.bundle",
300296
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
301297
);
302298
runOnlyForDeploymentPostprocessing = 0;

apps/WarriorHappy/ios/WarriorHappy/Info.plist

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<key>CFBundlePackageType</key>
2222
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
2323
<key>CFBundleShortVersionString</key>
24-
<string>3.2.8</string>
24+
<string>3.2.6</string>
2525
<key>CFBundleSignature</key>
2626
<string>????</string>
2727
<key>CFBundleURLTypes</key>

apps/WarriorHappy/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "warriorhappy",
33
"main": "index.ts",
4-
"version": "3.2.8",
4+
"version": "3.2.6",
55
"scripts": {
66
"start": "expo start",
77
"android": "expo run:android",
@@ -18,7 +18,6 @@
1818
"@expo/metro-runtime": "~3.1.3",
1919
"@expo/vector-icons": "^14.0.0",
2020
"@react-native-async-storage/async-storage": "1.21.0",
21-
"@react-native-google-signin/google-signin": "^11.0.0",
2221
"@react-navigation/native": "^6.0.2",
2322
"@shopify/flash-list": "1.6.3",
2423
"@supabase/auth-helpers-react": "^0.4.2",

apps/WarriorHappy/src/app/profile.tsx

+17-47
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,6 @@ import {
99
} from "react-native";
1010
import * as AppleAuthentication from "expo-apple-authentication";
1111
import { AntDesign } from "@expo/vector-icons";
12-
import {
13-
GoogleSignin,
14-
GoogleSigninButton,
15-
statusCodes,
16-
} from "@react-native-google-signin/google-signin";
1712
import { Session, User } from "@supabase/supabase-js";
1813

1914
import { initiateAppleSignIn } from "../utils/auth";
@@ -57,48 +52,7 @@ export default function Profile() {
5752
</View>
5853
);
5954
}
60-
function GoogleSignIn() {
61-
GoogleSignin.configure({
62-
scopes: ["https://www.googleapis.com/auth/userinfo.email"],
63-
webClientId:
64-
"439665504915-55me8e9me7evlcjsldvpnug8jriok7dh.apps.googleusercontent.com",
65-
});
6655

67-
return (
68-
<GoogleSigninButton
69-
size={GoogleSigninButton.Size.Wide}
70-
color={GoogleSigninButton.Color.Dark}
71-
onPress={async () => {
72-
try {
73-
await GoogleSignin.hasPlayServices();
74-
const userInfo = await GoogleSignin.signIn();
75-
if (userInfo.idToken) {
76-
const { data, error } = await supabase.auth.signInWithIdToken({
77-
provider: "google",
78-
token: userInfo.idToken,
79-
});
80-
console.log(error, data);
81-
} else {
82-
throw new Error("no ID token present!");
83-
}
84-
} catch (error: any) {
85-
if (error.code === statusCodes.SIGN_IN_CANCELLED) {
86-
Alert.alert("Error", "cancelled");
87-
// user cancelled the login flow
88-
} else if (error.code === statusCodes.IN_PROGRESS) {
89-
// operation (e.g. sign in) is in progress already
90-
Alert.alert("Error", "in progress");
91-
} else if (error.code === statusCodes.PLAY_SERVICES_NOT_AVAILABLE) {
92-
// play services not available or outdated
93-
} else {
94-
// some other error happened
95-
Alert.alert("Error", "other");
96-
}
97-
}
98-
}}
99-
/>
100-
);
101-
}
10256
function SignedInView({ user }: { user: User }) {
10357
return (
10458
<View className="flex gap-4">
@@ -136,6 +90,17 @@ function SignedOutView() {
13690
}
13791
};
13892

93+
const signInWithGoogle = async () => {
94+
try {
95+
const { error } = await supabase.auth.signInWithOAuth({
96+
provider: "google",
97+
});
98+
if (error) return Alert.alert("Error", error.message);
99+
} catch (e) {
100+
console.error("Unexpected error from Google SignIn: ", e);
101+
}
102+
};
103+
139104
return (
140105
<View className="space-y-4">
141106
<Text className="mb-4 text-2xl font-bold text-zinc-200">Sign In</Text>
@@ -162,7 +127,12 @@ function SignedOutView() {
162127
or
163128
</Text>
164129
</View>
165-
<GoogleSignIn />
130+
<Text
131+
className="mb-2 mr-2 inline-flex w-full items-center justify-between rounded-lg bg-[#4285F4] px-5 py-2.5 text-center text-sm font-medium text-white hover:bg-[#4285F4]/90 focus:outline-none focus:ring-4 focus:ring-[#4285F4]/50 dark:focus:ring-[#4285F4]/55"
132+
onPress={signInWithGoogle}
133+
>
134+
<Text className="flex-1 text-center">Continue with Google</Text>
135+
</Text>
166136
</View>
167137
);
168138
}

pnpm-lock.yaml

-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)