Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,5 @@ junit.xml
# Turborepo folder for persisting logs and outputs
.turbo
.sdk/

.polaris/
9 changes: 9 additions & 0 deletions PingSampleApp/ios/PingSampleApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@
<string>$(PRODUCT_NAME)</string>
<key>GIDClientID</key>
<string>$(GOOGLE_IOS_CLIENT_ID)</string>
<key>GIDServerClientID</key>
<string>$(GOOGLE_IOS_CLIENT_ID)</string>
Comment on lines +66 to +67

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n --glob '*.xcconfig' --glob '*.pbxproj' --glob '*.plist' \
  'GOOGLE_(IOS|SERVER)_CLIENT_ID' PingSampleApp packages

Repository: ForgeRock/ping-react-native-sdk

Length of output: 469


🌐 Web query:

Google Sign-In for iOS GIDServerClientID backend OAuth client ID developers.google.com

💡 Result:

The GIDServerClientID key is used in your iOS or macOS application's Info.plist file to configure the Google Sign-In SDK for backend authentication or offline access [1][2][3]. When your application needs to communicate with a backend server—such as to verify the user's ID token or exchange an authorization code for tokens—it must identify your backend project to Google's authentication system [4][1]. The GIDServerClientID serves this purpose [1]. Key details regarding GIDServerClientID: 1. Purpose: It represents your backend server's OAuth client ID, not your iOS/macOS application's client ID [1]. Providing this allows the SDK to include the correct audience information in the ID token or to request an authorization code that your specific backend is authorized to exchange [5][4][6]. 2. Configuration: You set this by adding the GIDServerClientID key to your Info.plist file with your web application's OAuth client ID as the string value [1][3]: GIDServerClientID YOUR_SERVER_CLIENT_ID 3. Obtaining the ID: You must create this client ID in the Google Cloud Console by selecting the Web application type for your project's OAuth client ID [1]. If you do not include this key, you will be unable to securely authenticate users on your backend or perform offline access actions like obtaining a serverAuthCode [5][4][1]. For most integrations, this is an optional key used only if your app requires a backend component [1][3].

Citations:


Use the backend OAuth client ID for GIDServerClientID.

GIDServerClientID must be the web/server OAuth client ID used by the backend, while GIDClientID should remain the iOS client ID.

Proposed fix
 <key>GIDServerClientID</key>
-<string>$(GOOGLE_IOS_CLIENT_ID)</string>
+<string>$(GOOGLE_SERVER_CLIENT_ID)</string>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<key>GIDServerClientID</key>
<string>$(GOOGLE_IOS_CLIENT_ID)</string>
<key>GIDServerClientID</key>
<string>$(GOOGLE_SERVER_CLIENT_ID)</string>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@PingSampleApp/ios/PingSampleApp/Info.plist` around lines 66 - 67, Update the
GIDServerClientID entry in Info.plist to reference the backend web/server OAuth
client ID configuration, while preserving GIDClientID as the iOS client ID. Use
the existing backend client-ID symbol or setting rather than
GOOGLE_IOS_CLIENT_ID.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>fbapi</string>
<string>fbauth</string>
<string>fbauth2</string>
<string>fb-messenger-share-api</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand Down
155 changes: 78 additions & 77 deletions PingSampleApp/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2570,6 +2570,7 @@ PODS:
- hermes-engine
- PingDavinci (= 2.0.0)
- PingDavinciPlugin (= 2.0.0)
- PingExternalIdP (= 2.0.0)
- PingLogger (= 2.0.0)
- PingOidc (= 2.0.0)
- PingOrchestrate (= 2.0.0)
Expand Down Expand Up @@ -3541,8 +3542,8 @@ SPEC CHECKSUMS:
MLKitCommon: 26b779f072a182c1603d4c88a101c350cac837b1
MLKitVision: fa8dea9012ac59497c79ddbe9ebf32051047ac4c
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
NitroImage: 5c2e7ee0b9efd9179dbb18a5b6b14baab032fe85
NitroModules: 7f1f24e38a8c6138e4f624ce65f929116edfd706
NitroImage: ee67d6f799e191273ae10439528e01c70c628d38
NitroModules: b6ae0e07aaae9c51cc144dd85f16e899de5eb1c6
PingBinding: 46036fcbcd4e3cb6a453f08822493ba451d4c8ab
PingBrowser: d1526bdcc6197781d0d54fe7ac16ba09a55a1faa
PingCommons: 49f2244bda1c41913fa37d9481e969702d658ade
Expand Down Expand Up @@ -3573,90 +3574,90 @@ SPEC CHECKSUMS:
RCTTypeSafety: d877728097547d0a37786cc9130c43ad71739ac3
React: 4b0b9cb962e694611e5e8a697c1b0300a2510c21
React-callinvoker: 70f125c17c7132811a6b473946ac5e7ae93b5e57
React-Core: 7cbc3118df2334b2ef597d9a515938b02c82109f
React-CoreModules: 7d8c14ecb889e7786a04637583b55b7d8f246baf
React-cxxreact: f32be07cba236c2f20f4e05ca200577ba5358e78
React-Core: bab40f5b1f46fe0c5896895a6f333e861a821a81
React-CoreModules: 05647d952e521113c128360633896ba7ba652e82
React-cxxreact: 2b4bac1ec6eecc6288ac8a6caea6afb42585740e
React-debug: deb3a146ef717fa3e8f4c23e0288369fe53199b7
React-defaultsnativemodule: 2c13a4240c5f96c42d069d1ba2392de6b4145bbd
React-domnativemodule: 91349b0b1cb20310cec1341b87cdd461aaa85e57
React-Fabric: bdfc7ec2481f26d7a9b8f59461f29ba4d903c549
React-FabricComponents: 47898469543d1bfb4528a9846419ec5568be89b1
React-FabricImage: ac8fc85ef452e5e9ae935c41118814651bd9e7f3
React-featureflags: 793b911e4c53e680db4a7d9965d0d6dc87b2fa88
React-featureflagsnativemodule: 25c9516d0dd004493c9bbafeb97da20bf9bde7dc
React-graphics: e07281690425dd9eeba3875d1faad28bc1f6da3b
React-hermes: bc1440d0e0662cc813bbf1c5ffbf9e0db2993a0f
React-idlecallbacksnativemodule: a2a3bb4a1793280b34d06d00169153b094be8c16
React-ImageManager: c9fa7461f3cab08e7bc98cbf55455b499e71c8b3
React-jserrorhandler: 15e591702040afed99cfcd088cf2337a8d09d807
React-jsi: 512ab3a1a628bc8824c41de8bcbbb81b2ac6fa8d
React-jsiexecutor: 653ccd2dee1e5ea558eecaf2f27b8bba0f09add8
React-jsinspector: 9121ccd2676a3f7c079ac01c9f90183422e3190e
React-jsinspectorcdp: 5c723ff2a09d73f2fdc496a545fb7003e7fdc079
React-jsinspectornetwork: 9cb0173f69e8405cef33fc79030fad26bbc3c073
React-jsinspectortracing: 65dc04125dc2392d85a82b6916f8cb088ea77566
React-jsitooling: 21af93cc98f760dd88d65b06b9317e0d4849fbbc
React-jsitracing: 4cc1b7de8087ae41c61a0eeee2593bc3362908b6
React-logger: 2f0d40bc8e648fbb1ff3b6580ad54189a8753290
React-Mapbuffer: 9a7c65078c6851397c1999068989e4fc239d0c80
React-microtasksnativemodule: 4f1ef719ba6c7ebbd2d75346ffa2916f9b4771c9
react-native-config: 85858ab5e598762e783a43ac592561ad110c35a9
react-native-safe-area-context: d446989793f96dc2f44c33c42dbfb316d983f24e
React-NativeModulesApple: f6f696e510b9d89c3c06b7764f56947dc13ae922
React-defaultsnativemodule: 11e2948787a15d3cf1b66d7f29f13770a177bff7
React-domnativemodule: 2f4b279acdb2963736fb5de2f585811dd90070b5
React-Fabric: 6f8d1a303c96f1d078c14d74c4005bf457e5b782
React-FabricComponents: b106410970e9a0c4e592da656c7a7e0947306c23
React-FabricImage: 1abaf230dfce9b58fdf53c4128f3f40c6e64af6a
React-featureflags: f7ef58d91079efde3ad223bcca6d197e845d5bcf
React-featureflagsnativemodule: ae5abc9849d1696f4f8f11ee3744bf5715e032cf
React-graphics: b306856c6ed9aac32f717a229550406a53b28a6d
React-hermes: b6edce8fa19388654b1aea30844497cbeade83bc
React-idlecallbacksnativemodule: cb386712842cb9e479c89311edb234d529b64db4
React-ImageManager: 8ce94417853eaa22faaad1f4cc1952dd3f8e2275
React-jserrorhandler: ab827d67dc270a9c8703eef524230baeafaf6876
React-jsi: 545342ec5c78ab1277af5f0dbe8d489e7e73db14
React-jsiexecutor: 20210891c7c77255c16dec6762faf68b373f9f74
React-jsinspector: 4e73460e488132d70d2b4894e5578cc856f2cb74
React-jsinspectorcdp: 8b2bcb5779289cb2b9ca517f2965ed23eb2fd3e0
React-jsinspectornetwork: b5e0cb9e488d294eed2d8209dc3dc0f9587210c1
React-jsinspectortracing: f3c4036e7b984405ac910f878576d325dd9f2834
React-jsitooling: 75bbfd221b6173a5e848ca5a6680506bac064a56
React-jsitracing: 11ed7d821864dd988c159d4943e0a1e0937c11b1
React-logger: 984ebd897afad067555d081deaf03f57c4315723
React-Mapbuffer: 0c045c844ce6d85cde53e85ab163294c6adad349
React-microtasksnativemodule: d9499269ad1f484ae71319bac1d9231447f2094e
react-native-config: adc7d6e70302363192ed8f2eae027864d218ff71
react-native-safe-area-context: 01f6d357d42395422eed7c3bfe715614728f2989
React-NativeModulesApple: 983f3483ef0a3446b56d490f09d579fba2442e17
React-oscompat: 114036cd8f064558c9c1a0c04fc9ae5e1453706a
React-perflogger: 4b2f88ae059b600daf268528a4a83366338eef05
React-performancetimeline: e15fd9798123436f99e46898422fe921fecf506b
React-perflogger: e7287fee27c16e3c8bd4d470f2361572b63be16b
React-performancetimeline: 8ebbaa31d2d0cea680b0a2a567500d3cab8954fc
React-RCTActionSheet: 68c68b0a7a5d2b0cfc255c64889b6e485974e988
React-RCTAnimation: 6bf502c89c53076f92cd1a254f5ec8d63ee263de
React-RCTAppDelegate: c90f5732784684c3dd226d812eccb578cd954ad7
React-RCTBlob: d2905f01749b80efd6d3b86fb15e30ed26d5450b
React-RCTFabric: 435b3ffaad113fb1f274c2f2a677c9fcc9b5cf55
React-RCTFBReactNativeSpec: a3178b419f42af196e90ca4bf07710dce5d68301
React-RCTImage: 8f5ffa03461339180a68820ea452af6e20ace2c7
React-RCTLinking: 1151646834d31f97580d8a75d768a84b2533b7f9
React-RCTNetwork: 52008724d0db90a540f4058ed0de0e41c4b7943c
React-RCTRuntime: 10ce9a7cb27ba307544d29a2a04e6202dc7b3e9a
React-RCTSettings: f724cacbd892ee18f985e1aebdd97386e49c76f5
React-RCTText: 6e1b95d9126d808410dfa96e09bc4441ec6f36f7
React-RCTVibration: 862a4e5b36d49e6299c8cbfb86486fc31f86f6fa
React-RCTAnimation: d6c5c728b888a967ce9aff1ff71a8ed71a68d069
React-RCTAppDelegate: 0fc048666bda159cd469a6fb9befb04b3fa62be4
React-RCTBlob: 12d8c699a1f906840113ee8d8bb575e69a05509f
React-RCTFabric: 01e815845ebc185f44205dcbf50eeb712fec23fe
React-RCTFBReactNativeSpec: f57927fb0af6ce2f25c19f8b894e2986138aa89f
React-RCTImage: a82518168f4ee407913b23ca749ca79ef51959f3
React-RCTLinking: 7f343b584c36f024f390fea563483568fe763ef6
React-RCTNetwork: 3165eb757ceb62a7cde4cdad043d63314122e8a3
React-RCTRuntime: feee590c459c4cb6aaa7a00f3abc8c04709b536f
React-RCTSettings: 6bad0ae45d8d872c873059f332f586f99875621f
React-RCTText: 657d60f35983062de8f0cea67c279aa7a3ea9858
React-RCTVibration: 78f4770515141efb7f55f9b27c49dda95319c3a8
React-rendererconsistency: f7baab26c6d0cd5b2eb7afcecfd2d8b957017b18
React-renderercss: 62acb8f010a062309e3bd0e203aa14636162e3b3
React-rendererdebug: 3a89ac44f15c7160735264d585a29525655238d2
React-renderercss: bdd2f83a4a054c3e4321fd61305c202b848e471b
React-rendererdebug: 9f8865ee038127a9d99d4b034c9da4935d204993
React-rncore: f7438473c4c71ee1963fb06a8635bb96013c9e1c
React-RuntimeApple: 81f0a9ba81ce7eb203529b0471dc69bf18f5f637
React-RuntimeCore: 6356e89b2518ba66a989c39a2adb18122a5e3b7b
React-RuntimeApple: 4d2ab9f72b9193da86eceded128a67254fc18aeb
React-RuntimeCore: 5fd73030438d094975ca0f549d162dd97746ae38
React-runtimeexecutor: 17c70842d5e611130cb66f91e247bc4a609c3508
React-RuntimeHermes: 0a1d7ce2fe08cf182235de1a9330b51aa6b935cd
React-runtimescheduler: 10ae98e1417eff159be5df8fdc8fcdaac557aba6
React-RuntimeHermes: 3c88e6e1ea7ea0899dcffc77c10d61ea46688cfd
React-runtimescheduler: 024500621c7c93d65371498abb4ee26d34f5d47d
React-timing: c3c923df2b86194e1682e01167717481232f1dc7
React-utils: 7791a96e194eec85cb41dc98a2045b5f07839598
ReactAppDependencyProvider: ba631a31783569c13056dd57ff39e19764abdd6f
ReactCodegen: 1e9f3e8a3f56fa25fbf39ecd37b708a4838d9032
ReactCommon: 96684b90b235d6ae340d126141edd4563b7a446a
RNCAsyncStorage: 767abb068db6ad28b5f59a129fbc9fab18b377e2
RNPingBinding: c9449a4e6b808afc9dcc311a07804559c0c522b4
RNPingBrowser: 042c960b67b47a85b0e1de373b76ddb2609487e1
RNPingCore: 3926e39f9ab60d83fb4d58225303864ca0d8171b
RNPingDavinci: 44860fa051499d949bad798336c15e508a78fb09
RNPingDeviceClient: bd78e33420a8f5dcd6ab3b21691805743b12079f
RNPingDeviceId: 24f49f8d518103367f6bbcbcf54138a424541ba7
RNPingDeviceProfile: 4c6b306859c9bc9cdad0aea830d9a8e0227dcc4a
RNPingExternalIdp: 372123fab1006f80c184a1f7992a3b335f69eb3c
RNPingFido: a67c3cb1fa2ff1930476189e5ebc1bc0a6e84d4a
RNPingJourney: 90546edde90b7c30f9b4a526a094e531a92094fe
RNPingLogger: db39fa39b31cd5026a7c279cd52996fafac190e1
RNPingOath: 2e64a03cd27ac198b21d2e4a4d767eaa31bd2b03
RNPingOidc: dceb88744c13a9bdd44a339f244d3a0535bf8232
RNPingPush: 898e5dd90a372e2ac9a27f0c622c2f17614fbd26
RNPingStorage: 17cf506d51259fa7c64a649d97ed974bd5350b22
RNScreens: 846d53087db560ed5fbc34feb0643adb5f9602c5
RNSVG: e8fb86f41fccd7b67c4480bb9e179e0ad5785b80
RNVectorIcons: 54df27a2e90ddeb674c7237d76060ec9762d0bc5
React-utils: 9154a037543147e1c24098f1a48fc8472602c092
ReactAppDependencyProvider: afd905e84ee36e1678016ae04d7370c75ed539be
ReactCodegen: 62690fdeb185860673cb78e3d9b049c7e1d40531
ReactCommon: 17fd88849a174bf9ce45461912291aca711410fc
RNCAsyncStorage: 1f04c8d56558e533277beda29187f571cf7eecb2
RNPingBinding: 217434d77078006a9578d5c71e6b91ebecb30628
RNPingBrowser: f2e419bf46f91bc108da9dedadd7180e733daeb5
RNPingCore: 1b0525ac7164f9ddb61b686c45b67f19530bb481
RNPingDavinci: 89c800fc120bcab9721411ee893b45f75791f1b5
RNPingDeviceClient: 031ca1ff479e23e95e2dabfc1564b6146f23f5ff
RNPingDeviceId: 36f6fc724c12af43e6eb7786b0b1a0e6bead491c
RNPingDeviceProfile: 6e7a3749b92ae74dc0bf937ec5c804ba4b33a3aa
RNPingExternalIdp: a3e7bff2d34f8c16882603b34d1700e253593888
RNPingFido: 4c4c4d14f876b8691ebd4eea65b4e9b3891347e0
RNPingJourney: a4c26d4df1566b86c2f4e4b96fb1c3a1a85e476f
RNPingLogger: ff542c88b69b4f4e8fa188e161ac18b8384e029d
RNPingOath: 5f47ad55b82bc9929366c51c1161438fc6f8be6c
RNPingOidc: 7f639c41e84ada3c3852bc86d103b53d466adf76
RNPingPush: c1b34c4c598d10f28e643252875dbf4ace9248ea
RNPingStorage: e736d6eeb163d1bcca220207366a33746e06bd5d
RNScreens: f35bcc83b6e3a871635b1c28728e63c9560f159a
RNSVG: 6c85ed4204fc8680c2f6fca3532277fd4f65e5ab
RNVectorIcons: be4d047a76ad307ffe54732208fb0498fcb8477f
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
VisionCamera: 3914b29387fc40c64f7022830cfdc604f94eb966
VisionCameraBarcodeScanner: 0b6fe2e3c52ca68a0dbd5d25719c7523c68d807f
VisionCamera: e82024ee7ce0fb6168a4c468ef43c711f4486baa
VisionCameraBarcodeScanner: a65d708fd3672e6d43e94cce39b548465851752b
Yoga: daa1e4de4b971b977b23bc842aaa3e135324f1f3

PODFILE CHECKSUM: 83df8013c84a3febb48d5c5092b148ef9136e104

COCOAPODS: 1.15.2
COCOAPODS: 1.16.2
3 changes: 3 additions & 0 deletions PingSampleApp/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
* of the MIT license. See the LICENSE file for details.
*/

// eslint-disable-next-line @typescript-eslint/no-require-imports

Check warning on line 8 in PingSampleApp/metro.config.js

View workflow job for this annotation

GitHub Actions / lint-and-typecheck / lint-and-typecheck

'@typescript-eslint/no-require-imports' rule is disabled but never reported
const path = require('path');
// eslint-disable-next-line @typescript-eslint/no-require-imports

Check warning on line 10 in PingSampleApp/metro.config.js

View workflow job for this annotation

GitHub Actions / lint-and-typecheck / lint-and-typecheck

'@typescript-eslint/no-require-imports' rule is disabled but never reported
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');

// Path to local library package (adjust the relative path if needed)
Expand All @@ -30,6 +30,7 @@
__dirname,
'../packages/device-client',
);
const davinciPackage = path.resolve(__dirname, '../packages/davinci');
const pushPackage = path.resolve(__dirname, '../packages/push');
const workspaceRoot = path.resolve(__dirname, '..');

Expand All @@ -46,6 +47,7 @@
loggerPackage,
typesPackage,
bindingPackage,
davinciPackage,
deviceClientPackage,
pushPackage,
workspaceRoot,
Expand All @@ -71,6 +73,7 @@
'@ping-identity/rn-logger': loggerPackage,
'@ping-identity/rn-types': typesPackage,
'@ping-identity/rn-binding': bindingPackage,
'@ping-identity/rn-davinci': davinciPackage,
'@ping-identity/rn-device-client': deviceClientPackage,
'@ping-identity/rn-push': pushPackage,
},
Expand Down
8 changes: 7 additions & 1 deletion PingSampleApp/ui/DaVinciScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@ export default function DaVinciScreen(props: Props): React.ReactElement {
const handleAuthenticated = useCallback((): void => {
navigation.navigate('Home');
}, [navigation]);
const handleUserProfile = useCallback((): void => {
navigation.navigate('UserProfile');
}, [navigation]);

return (
<ScrollView
style={davinciScreenStyles.screen}
contentContainerStyle={davinciScreenStyles.content}
keyboardShouldPersistTaps="handled"
>
<DaVinciClientPanel onAuthenticated={handleAuthenticated} />
<DaVinciClientPanel
onAuthenticated={handleAuthenticated}
onUserProfile={handleUserProfile}
/>
</ScrollView>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import React, { memo } from 'react';
import DaVinciDeviceField from './DaVinciDeviceField';
import DaVinciFlowButton from './DaVinciFlowButton';
import DaVinciIdpField from './DaVinciIdpField';
import DaVinciLabelField from './DaVinciLabelField';
import DaVinciMultiSelectField from './DaVinciMultiSelectField';
import DaVinciPasswordField from './DaVinciPasswordField';
Expand Down Expand Up @@ -56,6 +57,10 @@ function DaVinciFieldRenderer(
case 'DEVICE_REGISTRATION':
case 'DEVICE_AUTHENTICATION':
return <DaVinciDeviceField {...props} />;
case 'SOCIAL_LOGIN_BUTTON':
return (
<DaVinciIdpField {...props} onIdpAuthorize={props.onIdpAuthorize} />
);
default:
return <DaVinciUnsupportedField {...props} />;
}
Expand Down
Loading
Loading