Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions FronteggRN.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ios/FronteggRN.m
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
9 changes: 8 additions & 1 deletion ios/FronteggRN.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}
Expand Down
10 changes: 8 additions & 2 deletions src/FronteggNative.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,15 @@
export async function directLoginAction(
type: string,
data: string,
ephemeralSession: boolean = true
ephemeralSession: boolean = true,
additionalQueryParams?: Record<string, string>
): Promise<void> {
return FronteggRN.directLoginAction(type, data, ephemeralSession);
return FronteggRN.directLoginAction(
type,
data,
ephemeralSession,
additionalQueryParams
);
}

export async function loginWithPasskeys(): Promise<void> {
Expand All @@ -56,7 +62,7 @@
}

export async function requestAuthorize(
refreshToken: string,

Check warning on line 65 in src/FronteggNative.ts

View workflow job for this annotation

GitHub Actions / Lint | Typecheck

'refreshToken' is already declared in the upper scope on line 42 column 23

Check warning on line 65 in src/FronteggNative.ts

View workflow job for this annotation

GitHub Actions / Lint and Typecheck

'refreshToken' is already declared in the upper scope on line 42 column 23
deviceTokenCookie?: string
) {
return await FronteggRN.requestAuthorize(refreshToken, deviceTokenCookie);
Expand Down
Loading