about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--android/app/src/main/AndroidManifest.xml9
-rw-r--r--ios/app/Info.plist13
-rw-r--r--src/routes/index.tsx2
4 files changed, 31 insertions, 0 deletions
diff --git a/README.md b/README.md
index 1ac5ff41d..d7e93620c 100644
--- a/README.md
+++ b/README.md
@@ -28,3 +28,10 @@ Uses:
   - Create mock api
 - Tests
   - Should just try to catch errors on basic load
+
+## Various notes
+
+- ["SSO" flows on mobile](https://developer.okta.com/blog/2022/01/13/mobile-sso)
+  - Suggests we might want to use `ASWebAuthenticationSession` on iOS
+  - [react-native-inappbrowser-reborn](https://www.npmjs.com/package/react-native-inappbrowser-reborn) with `openAuth: true` might be worth exploring
+  - We might even [get rejected by the app store](https://community.auth0.com/t/react-native-ios-app-rejected-on-appstore-for-using-react-native-auth0/36793) if we don't
\ No newline at end of file
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 38d83125f..483dff147 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -30,6 +30,15 @@
             <data android:scheme="https" />
             <data android:host="pubsq.pfrazee.com" />
         </intent-filter>
+        <!-- deep linking via custom links -->
+        <intent-filter>
+            <action android:name="android.intent.action.VIEW" />
+            <category android:name="android.intent.category.DEFAULT" />
+            <category android:name="android.intent.category.BROWSABLE" />
+            <!-- debug scheme: pubsq://app -->
+            <data android:scheme="pubsq" />
+            <data android:host="app" />
+        </intent-filter>
       </activity>
     </application>
 </manifest>
diff --git a/ios/app/Info.plist b/ios/app/Info.plist
index fca6902c2..a527f1fcc 100644
--- a/ios/app/Info.plist
+++ b/ios/app/Info.plist
@@ -20,6 +20,19 @@
 	<string>1.0</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
+	<key>CFBundleURLTypes</key>
+	<array>
+		<dict>
+			<key>CFBundleTypeRole</key>
+			<string>Editor</string>
+			<key>CFBundleURLName</key>
+			<string>xyz.blueskyweb.pubsq</string>
+			<key>CFBundleURLSchemes</key>
+			<array>
+				<string>pubsqapp</string>
+			</array>
+		</dict>
+	</array>
 	<key>CFBundleVersion</key>
 	<string>1</string>
 	<key>LSRequiresIPhoneOS</key>
diff --git a/src/routes/index.tsx b/src/routes/index.tsx
index 2accd6fb2..32398e9ad 100644
--- a/src/routes/index.tsx
+++ b/src/routes/index.tsx
@@ -25,6 +25,8 @@ const linking: LinkingOptions<RootTabsParamList> = {
   prefixes: [
     'http://localhost:3000', // local dev
     'https://pubsq.pfrazee.com', // test server (universal links only)
+    'pubsqapp://', // custom protocol (ios)
+    'pubsq://app', // custom protocol (android)
   ],
   config: {
     screens: {