Skip to content

Commit

Permalink
feat: add ios google integration (#204)
Browse files Browse the repository at this point in the history
Signed-off-by: Sai Ranjit Tummalapalli <[email protected]>
  • Loading branch information
sairanjit committed Jul 4, 2024
1 parent 9ff7c88 commit e90a730
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 7 deletions.
6 changes: 5 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ OCA_URL=https://raw.githubusercontent.com/credebl/credebl-aries-oca-bundles/rele
PUBLIC_ORG=https://example.com

#PROOF_TEMPLATE_URL
PROOF_TEMPLATE_URL=
PROOF_TEMPLATE_URL=

# Google Signin
GOOGLE_WEB_CLIENT_ID=CLIENT_ID
GOOGLE_IOS_CLIENT_ID=CLIENT_ID
15 changes: 9 additions & 6 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ const App = () => {
// Hide the native splash / loading screen so that our
// RN version can be displayed
SplashScreen.hide()
GoogleSignin.configure({
webClientId: Config.GOOGLE_WEB_CLIENT_ID,
iosClientId: Config.GOOGLE_IOS_CLIENT_ID,
offlineAccess: true,
scopes: ['https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.metadata'],
})

if (Config.GOOGLE_WEB_CLIENT_ID && Config.GOOGLE_IOS_CLIENT_ID) {
GoogleSignin.configure({
webClientId: Config.GOOGLE_WEB_CLIENT_ID,
iosClientId: Config.GOOGLE_IOS_CLIENT_ID,
offlineAccess: true,
scopes: ['https://www.googleapis.com/auth/drive.file', 'https://www.googleapis.com/auth/drive.metadata'],
})
}
}, [])

return (
Expand Down
8 changes: 8 additions & 0 deletions ios/AdeyaWallet/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@
<string>link.credebl.id</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>com.googleusercontent.apps.386865711438-33clai2qtm879j181u4nnhg3koh2ha6a</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
Expand Down
29 changes: 29 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ PODS:
- React
- React-callinvoker
- React-Core
- AppAuth (1.7.5):
- AppAuth/Core (= 1.7.5)
- AppAuth/ExternalUserAgent (= 1.7.5)
- AppAuth/Core (1.7.5)
- AppAuth/ExternalUserAgent (1.7.5):
- AppAuth/Core
- aries-askar (0.2.1):
- React
- React-callinvoker
Expand Down Expand Up @@ -95,6 +101,10 @@ PODS:
- GoogleUtilities/Environment (~> 7.7)
- nanopb (< 2.30911.0, >= 2.30908.0)
- PromisesObjC (< 3.0, >= 1.2)
- GoogleSignIn (7.1.0):
- AppAuth (< 2.0, >= 1.7.3)
- GTMAppAuth (< 5.0, >= 4.1.1)
- GTMSessionFetcher/Core (~> 3.3)
- GoogleUtilities (7.13.0):
- GoogleUtilities/AppDelegateSwizzler (= 7.13.0)
- GoogleUtilities/Environment (= 7.13.0)
Expand Down Expand Up @@ -139,6 +149,10 @@ PODS:
- GoogleUtilities/UserDefaults (7.13.0):
- GoogleUtilities/Logger
- GoogleUtilities/Privacy
- GTMAppAuth (4.1.1):
- AppAuth/Core (~> 1.7)
- GTMSessionFetcher/Core (< 4.0, >= 3.3)
- GTMSessionFetcher/Core (3.4.1)
- hermes-engine (0.72.3):
- hermes-engine/Pre-built (= 0.72.3)
- hermes-engine/Pre-built (0.72.3)
Expand Down Expand Up @@ -619,6 +633,9 @@ PODS:
- React-Core
- RNGestureHandler (2.13.1):
- React-Core
- RNGoogleSignin (12.1.0):
- GoogleSignIn (~> 7.1)
- React-Core
- RNKeychain (8.1.2):
- React-Core
- RNLocalize (3.0.2):
Expand Down Expand Up @@ -745,6 +762,7 @@ DEPENDENCIES:
- "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)"
- RNFS (from `../node_modules/react-native-fs`)
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
- "RNGoogleSignin (from `../node_modules/@react-native-google-signin/google-signin`)"
- RNKeychain (from `../node_modules/react-native-keychain`)
- RNLocalize (from `../node_modules/react-native-localize`)
- RNPermissions (from `../node_modules/react-native-permissions`)
Expand All @@ -759,6 +777,7 @@ DEPENDENCIES:

SPEC REPOS:
trunk:
- AppAuth
- CatCrypto
- CocoaAsyncSocket
- Firebase
Expand All @@ -771,7 +790,10 @@ SPEC REPOS:
- fmt
- GoogleAppMeasurement
- GoogleDataTransport
- GoogleSignIn
- GoogleUtilities
- GTMAppAuth
- GTMSessionFetcher
- libevent
- nanopb
- PromisesObjC
Expand Down Expand Up @@ -904,6 +926,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-fs"
RNGestureHandler:
:path: "../node_modules/react-native-gesture-handler"
RNGoogleSignin:
:path: "../node_modules/@react-native-google-signin/google-signin"
RNKeychain:
:path: "../node_modules/react-native-keychain"
RNLocalize:
Expand All @@ -929,6 +953,7 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
anoncreds: c709906b5a3caaf6bbe871646e6c16b522c6531d
AppAuth: 501c04eda8a8d11f179dbe8637b7a91bb7e5d2fa
aries-askar: cb89b1fdc61cd8adf0408a0dd28f7eb6dbf0dec9
boost: 57d2868c099736d80fcd648bf211b4431e51a558
CatCrypto: a477899b6be4954e75be4897e732da098cc0a5a8
Expand All @@ -947,7 +972,10 @@ SPEC CHECKSUMS:
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
GoogleAppMeasurement: 7fee012a868315d418f365fbc8d394d8e020e749
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
GoogleSignIn: d4281ab6cf21542b1cfaff85c191f230b399d2db
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
GTMAppAuth: f69bd07d68cd3b766125f7e072c45d7340dea0de
GTMSessionFetcher: 8000756fc1c19d2e5697b90311f7832d2e33f6cd
hermes-engine: 10fbd3f62405c41ea07e71973ea61e1878d07322
indy-vdr: 790ab1fd9b12ad5adfce4905c327f5902253eeeb
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
Expand Down Expand Up @@ -1006,6 +1034,7 @@ SPEC CHECKSUMS:
RNFBMessaging: 57ff90f2a60184838da1da7904dfee6b1ce99a20
RNFS: 4ac0f0ea233904cb798630b3c077808c06931688
RNGestureHandler: 38aa38413896620338948fbb5c90579a7b1c3fde
RNGoogleSignin: 97d8ec68fbbe6beb4820b374acf4470acac21756
RNKeychain: a65256b6ca6ba6976132cc4124b238a5b13b3d9c
RNLocalize: dbea38dcb344bf80ff18a1757b1becf11f70cae4
RNPermissions: f5763a7aa5b1aae3b0c0546791b002e3048042bd
Expand Down

0 comments on commit e90a730

Please sign in to comment.