From cc20211a7dc044c35bd806d99f6d2200a2065e2e Mon Sep 17 00:00:00 2001 From: Renan Mav Date: Tue, 22 Oct 2024 20:24:58 -0300 Subject: [PATCH] feat: start implementing ASWebAuthenticationSession --- example/App.tsx | 12 +++++ ios/HybridASWebAuthenticationSession.swift | 50 +++++++++++++++++++ nitro.json | 3 ++ .../ios/NitroInAppBrowserAutolinking.mm | 8 +++ .../ios/NitroInAppBrowserAutolinking.swift | 12 +++++ src/ASWebAuthenticationSession.ts | 31 ++++++++++++ src/index.ts | 1 + src/specs/ASWebAuthenticationSession.nitro.ts | 2 +- 8 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 ios/HybridASWebAuthenticationSession.swift create mode 100644 src/ASWebAuthenticationSession.ts diff --git a/example/App.tsx b/example/App.tsx index 9df1fd4..ff54a88 100644 --- a/example/App.tsx +++ b/example/App.tsx @@ -24,6 +24,7 @@ import { InAppBrowser, SFSafariViewController, ModalPresentationStyle, + ASWebAuthenticationSession, ChromeCustomTabs, } from 'react-native-in-app-browser' @@ -60,6 +61,7 @@ function Section({ children, title }: SectionProps): React.JSX.Element { } const URL = 'https://reactnative.dev' +const AUTH_URL = 'https://github.com/login' function App(): React.JSX.Element { const isDarkMode = useColorScheme() === 'dark' @@ -114,6 +116,16 @@ function App(): React.JSX.Element { }} /> +
+