diff --git a/README.md b/README.md index 4191318d..5f48445d 100644 --- a/README.md +++ b/README.md @@ -461,12 +461,12 @@ You can also use the Okta Admin Console: 3. Specify a name and description of your choosing. 4. Select **Native** and use the following for your Callback and Logout URLs: - org.reactjs.native.example.:///ios/org.reactjs.native.example./callback,com.:///android/com./callback + org.reactjs.native.example..auth0:///ios/org.reactjs.native.example./callback,com..auth0:///android/com./callback -**NOTE:** The `` and `` placeholders is the iOS callback have different cases. The first is all lowercase and the second is camel case. For example: +For example: ``` -org.reactjs.native.example.secureauth0://dev-06bzs1cu.us.auth0.com/ios/org.reactjs.native.example.SecureAuth0/callback, com.secureauth0://dev-06bzs1cu.us.auth0.com/android/com.secureauth0/callback +org.reactjs.native.example.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/ios/org.reactjs.native.example.secureauth0/callback, com.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/android/com.secureauth0/callback ``` Install the Schematics CLI globally. @@ -490,12 +490,12 @@ You can also use the Auth0 Console: * Select the **Settings** tab. * Add the following for Allowed Callback and Logout URLs: - org.reactjs.native.example.:///ios/org.reactjs.native.example./callback,com.:///android/com./callback + org.reactjs.native.example..auth0:///ios/org.reactjs.native.example./callback,com..auth0:///android/com./callback For example: ``` -org.reactjs.native.example.secureauth0://dev-06bzs1cu.us.auth0.com/ios/org.reactjs.native.example.SecureAuth0/callback, com.secureauth0://dev-06bzs1cu.us.auth0.com/android/com.secureauth0/callback +org.reactjs.native.example.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/ios/org.reactjs.native.example.secureauth0/callback, com.secureauth0.auth0://dev-06bzs1cu.us.auth0.com/android/com.secureauth0/callback ``` ### iOS diff --git a/src/add-auth/index.ts b/src/add-auth/index.ts index d404fb52..129b5d92 100755 --- a/src/add-auth/index.ts +++ b/src/add-auth/index.ts @@ -336,7 +336,7 @@ import { AuthModule } from './auth/auth.module';`); if (appBuild) { let manifestPlaceholders; if (options.auth0) { - manifestPlaceholders = `auth0Domain: "${options.issuer}", auth0Scheme: "\${applicationId}"` + manifestPlaceholders = `auth0Domain: "${options.issuer}", auth0Scheme: "\${applicationId}.auth0"` } else { manifestPlaceholders = `appAuthRedirectScheme: "${options.packageName}"` } @@ -361,11 +361,19 @@ import { AuthModule } from './auth/auth.module';`); \t\t\tauth0 \t\t\tCFBundleURLSchemes \t\t\t -\t\t\t\t$(PRODUCT_BUNDLE_IDENTIFIER) +\t\t\t\t$(PRODUCT_BUNDLE_IDENTIFIER).auth0 \t\t\t \t\t \t`); host.overwrite(`ios/${appName}/Info.plist`, iosURLs); + + // Update Podfile to require iOS 13 + const podfile: Buffer | null = host.read(`./ios/Podfile`); + if (podfile) { + const podfileContents = podfile.toString('utf-8') + .replace('platform :ios, min_ios_version_supported', 'platform :ios, \'13.0\''); + host.overwrite(`ios/Podfile`, podfileContents); + } } }