diff --git a/README.md b/README.md index 2823c2b..d833b79 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Due to Android 11's package visibility restrictions, apps need to declare the pa #### iOS: -To check if the CieID app can be opened via its URL scheme, you need to declare the URL scheme in your `Info.plist` file. +To check if the CieID app can be opened via its `URL` scheme, you need to declare the URL scheme in your `Info.plist` file. Add the following to your `Info.plist`: @@ -81,9 +81,9 @@ openCieIdApp('https://your-app.com/auth-callback', (result) => { **Parameters**: -- `forwardUrl` _(string)_: The URL that the CieID app will use to continue the authentication process. +- `forwardUrl` _(string)_: The `URL` that the CieID app will use to continue the authentication process. - `callback` _(function)_: A callback function that receives the result of the operation either success or failure. -- `isUatEnvironment` _(boolean)_: Optional. Default is `false`. Tells the method to use the UAT environment package name instead of the production one. +- `isUatEnvironment` _(boolean)_: Optional. Default is `false`. Tells the method to use the UAT environment package name instead of the production one, and to change the service provider IdP id from `'xx_servizicie'` to `'xx_servizicie_coll'` **Returns**: @@ -126,7 +126,7 @@ Inside the sample app, you can find a complete example of how to handle the CieI React.useEffect(() => { // https://reactnative.dev/docs/linking#open-links-and-deep-links-universal-links Linking.addEventListener('url', ({ url }) => { - console.log('-- -->URL from Deep Liking', url); + console.log('-- --> URL from Deep Liking', url); // if the url is of this format: iologincie:https://idserver.servizicie.interno.gov.it/idp/login/livello2mobile?value=e1s2 // extract the part after iologincie: and dispatch the action to handle the login if (url.startsWith('iologincie:')) { @@ -243,7 +243,7 @@ And to add the appropriate code for deep linking in you `AppDelegate.m` file: :construction: **Note**: The `IoReactNativeCieidView` component is not production ready and it is currently only available on iOS. Android support is not yet implemented. -- `sp_url` - The URL of the federated service provider. +- `sp_url` - The `URL` of the federated service provider. - `sp_url_scheme` - The app bundle name to open (e.g., `it.ipzs.cieid`). ```tsx diff --git a/src/index.tsx b/src/index.tsx index 755e501..5f710c7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -140,7 +140,7 @@ export type CieIdErrorResult = { * The result of the {@link openCieIdApp} method, coming from the callback, * is a union type of two possible results (see {@link CieIdReturnType}). * In case of success, the object will be the following. - * The `url` property is the URL that the CieID app will return to the calling app, + * The `url` property is the `URL` that the CieID app will return to the calling app, * after the authentication process is completed. */ export type CieIdSuccessResult = { @@ -157,13 +157,13 @@ export type CieIdReturnType = CieIdErrorResult | CieIdSuccessResult; * Open the CieID app on the device. * This method is useful to open the CieID app from the calling app, during the authentication process. * The CieID app will return to the calling app the URL that the calling app will use to complete the authentication process. - * The URL will be passed to the callback function. + * The `URL` will be passed to the callback function. * The callback function will receive an object with the `id` property set to `'URL'` in case of success. - * The object will have a `url` property that will be the URL that the CieID app will return to the calling app. + * The object will have a `url` property that will be the `URL` that the CieID app will return to the calling app. * In case of error, the object will have the `id` property set to `'ERROR'`. * The object will have a `code` property that will be one of the error codes of the {@link CieIdModuleErrorCodes} type. * - * @param forwardUrl - The URL that the CieID app will use to continue the authentication process. + * @param forwardUrl - The `URL` that the CieID app will use to continue the authentication process. * @param callback - The callback function that will receive the result of the operation. * @param isUatEnvironment - Optional. Default is `false`. * Tells the method to use the UAT environment package name instead of the production one.