diff --git a/FronteggRN.podspec b/FronteggRN.podspec index fa20879..e9ff9bd 100644 --- a/FronteggRN.podspec +++ b/FronteggRN.podspec @@ -20,10 +20,10 @@ Pod::Spec.new do |s| # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. if respond_to?(:install_modules_dependencies, true) install_modules_dependencies(s) - s.dependency "FronteggSwift", "1.2.31" + s.dependency "FronteggSwift", "1.2.32" else s.dependency "React-Core" - s.dependency "FronteggSwift", "1.2.31" + s.dependency "FronteggSwift", "1.2.32" # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 18f5d06..c2fc5e5 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -11,10 +11,10 @@ PODS: - ReactCommon/turbomodule/core (= 0.72.1) - fmt (6.2.1) - FronteggRN (1.2.8): - - FronteggSwift (= 1.2.31) + - FronteggSwift (= 1.2.32) - RCT-Folly (= 2021.07.22.00) - React-Core - - FronteggSwift (1.2.31) + - FronteggSwift (1.2.32) - glog (0.3.5) - hermes-engine (0.72.1): - hermes-engine/Pre-built (= 0.72.1) diff --git a/ios/FronteggRN.m b/ios/FronteggRN.m index 689d4f9..65404ab 100644 --- a/ios/FronteggRN.m +++ b/ios/FronteggRN.m @@ -20,6 +20,7 @@ @interface RCT_EXTERN_MODULE(FronteggRN, RCTEventEmitter) directLoginAction: (NSString *)type data: (NSString *)data ephemeralSession: (BOOL)ephemeralSession + additionalQueryParams: (nullable NSDictionary *)additionalQueryParams resolver: (RCTPromiseResolveBlock)resolve rejecter: (RCTPromiseRejectBlock)reject ) diff --git a/ios/FronteggRN.swift b/ios/FronteggRN.swift index 7909d11..384f46c 100644 --- a/ios/FronteggRN.swift +++ b/ios/FronteggRN.swift @@ -151,11 +151,18 @@ class FronteggRN: RCTEventEmitter { _ type: String, data: String, ephemeralSession: Bool, + additionalQueryParams: [String: String]? = nil, resolver: @escaping RCTPromiseResolveBlock, rejecter: RCTPromiseRejectBlock ) -> Void { - fronteggApp.auth.directLoginAction(window: nil, type: type, data: data, ephemeralSession: ephemeralSession) { _ in + fronteggApp.auth.directLoginAction( + window: nil, + type: type, + data: data, + ephemeralSession: ephemeralSession, + additionalQueryParams: additionalQueryParams + ) { _ in resolver("Success") } } diff --git a/src/FronteggNative.ts b/src/FronteggNative.ts index c257bc2..9bb9d73 100644 --- a/src/FronteggNative.ts +++ b/src/FronteggNative.ts @@ -46,9 +46,15 @@ export async function refreshToken() { export async function directLoginAction( type: string, data: string, - ephemeralSession: boolean = true + ephemeralSession: boolean = true, + additionalQueryParams?: Record ): Promise { - return FronteggRN.directLoginAction(type, data, ephemeralSession); + return FronteggRN.directLoginAction( + type, + data, + ephemeralSession, + additionalQueryParams + ); } export async function loginWithPasskeys(): Promise {