From 66fc15c24114db3ce7e7e3bcbe6ba50a57d88f00 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Sun, 1 Sep 2024 06:32:20 -0400 Subject: [PATCH] fix google login --- RN-Read.txt | 15 +++++++++++++++ app.json => app.config.js | 11 +++++++---- app/index.jsx | 12 ++++++++++++ eas.json | 5 ++++- package.json | 4 +++- 5 files changed, 41 insertions(+), 6 deletions(-) rename app.json => app.config.js (71%) diff --git a/RN-Read.txt b/RN-Read.txt index d69914b..ae8c731 100644 --- a/RN-Read.txt +++ b/RN-Read.txt @@ -34,3 +34,18 @@ https://docs.expo.dev/build/setup/ https://docs.expo.dev/build/setup/ + +eas secret:create --scope project --name GOOGLE_SERVICES_JSON --type file --value D:\REACT-NATIVE\HealthRader\CONFIGS\firebase-android\google-services.json +eas secret:create --scope project --name GOOGLE_SERVICES_INFOPLIST --type file --value D:\REACT-NATIVE\HealthRader\CONFIGS\firebase-ios\GoogleService-Info.plist + +eas build -p ios --profile development +eas build -p android --profile development + + +Type JKS +Key Alias ab382f07408dd13d1c2dd6b4e0a78f45 +MD5 Fingerprint 2D:51:C5:71:88:BE:26:00:17:6B:EF:D0:F0:A3:A8:BD +SHA1 Fingerprint 13:79:B1:87:74:71:88:CB:ED:59:4E:CB:04:3F:4D:13:69:1D:43:67 +SHA256 Fingerprint 04:40:42:46:4A:FE:CA:AF:59:3F:00:5C:BC:8B:19:BA:9C:6A:71:BB:90:6F:C2:B1:22:6F:45:63:63:96:0F:2F +Updated 8 seconds ago + diff --git a/app.json b/app.config.js similarity index 71% rename from app.json rename to app.config.js index c01cb57..058785f 100644 --- a/app.json +++ b/app.config.js @@ -1,4 +1,4 @@ -{ +export default { "expo": { "name": "HealthRader", "slug": "com-chiefsoft-raderapp", @@ -12,16 +12,19 @@ "resizeMode": "contain", "backgroundColor": "#ffffff" }, + "assetBundlePatterns": ["**/*"], "ios": { "supportsTablet": true, - "bundleIdentifier": "com.chiefsoft.raderapp" + "bundleIdentifier": "com.chiefsoft.raderapp", + "googleServicesFile": process.env.GOOGLE_SERVICES_INFOPLIST }, "android": { "adaptiveIcon": { "foregroundImage": "./assets/adaptive-icon.png", "backgroundColor": "#ffffff" }, - "package": "com.chiefsoft.raderapp" + "package": "com.chiefsoft.raderapp", + "googleServicesFile": process.env.GOOGLE_SERVICES_JSON }, "web": { "favicon": "./assets/favicon.png", @@ -36,7 +39,7 @@ } }, "plugins": [ - "expo-router" + "expo-router", "@react-native-google-signin/google-signin" ] } } diff --git a/app/index.jsx b/app/index.jsx index c7a012e..36c9802 100644 --- a/app/index.jsx +++ b/app/index.jsx @@ -1,6 +1,10 @@ import { Stack, useNavigation } from 'expo-router'; import { ImageBackground, StyleSheet, Button, TextInput, SafeAreaView, Text, View ,Image,Alert } from 'react-native'; import { useEffect,useState } from 'react'; +import { + GoogleSignin, + GoogleSigninButton, +} from "@react-native-google-signin/google-signin"; const Home =()=> { const [username, onChangeUsername] = useState(''); @@ -8,6 +12,14 @@ const Home =()=> { const image = {uri: 'https://rader.app/assets/images/app/home.jpg'}; + useEffect(() => { + GoogleSignin.configure({ + webClientId: + "828012052860-rq3m5ppckbmtc7vfjp3mau0s6p8h9mgm.apps.googleusercontent.com", + }); + }, []); + + //https://apigate.lotus.g1.wrenchboard.com/en/wrench/api/v1/userlogin return ( diff --git a/eas.json b/eas.json index 511527f..ca02a5a 100644 --- a/eas.json +++ b/eas.json @@ -5,7 +5,10 @@ "build": { "development": { "developmentClient": true, - "distribution": "internal" + "distribution": "internal", + "ios": { + "simulator": true + } }, "preview": { "distribution": "internal" diff --git a/package.json b/package.json index 70990e0..c4b33d7 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,12 @@ "react-native-web": "~0.19.10", "@expo/metro-runtime": "~3.2.1", "expo-router": "~3.5.23", + "@react-native-google-signin/google-signin": "^10.1.1", "react-native-safe-area-context": "4.10.5", "react-native-screens": "3.31.1", "expo-linking": "~6.3.1", - "expo-constants": "~16.0.2" + "expo-constants": "~16.0.2", + "expo-dev-client": "~4.0.25" }, "devDependencies": { "@babel/core": "^7.20.0"