Closed artur-burlak closed 3 months ago
We are actively working on Bridgeless support and hope to have an update soon.
I am having this issue as well
If anyone else is facing this, I used patch-package with
diff --git a/node_modules/react-native-app-auth/ios/RNAppAuth.m b/node_modules/react-native-app-auth/ios/RNAppAuth.m
index eb11aa5..938c045 100644
--- a/node_modules/react-native-app-auth/ios/RNAppAuth.m
+++ b/node_modules/react-native-app-auth/ios/RNAppAuth.m
@@ -97,10 +97,10 @@ - (dispatch_queue_t)methodQueue
skipCodeExchange: (BOOL) skipCodeExchange
connectionTimeoutSeconds: (double) connectionTimeoutSeconds
additionalHeaders: (NSDictionary *_Nullable) additionalHeaders
- useNonce: (BOOL *) useNonce
- usePKCE: (BOOL *) usePKCE
+ useNonce: (BOOL) useNonce
+ usePKCE: (BOOL) usePKCE
iosCustomBrowser: (NSString *) iosCustomBrowser
- prefersEphemeralSession: (BOOL *) prefersEphemeralSession
+ prefersEphemeralSession: (BOOL) prefersEphemeralSession
resolve: (RCTPromiseResolveBlock) resolve
reject: (RCTPromiseRejectBlock) reject)
{
@@ -204,7 +204,7 @@ - (dispatch_queue_t)methodQueue
serviceConfiguration: (NSDictionary *_Nullable) serviceConfiguration
additionalParameters: (NSDictionary *_Nullable) additionalParameters
iosCustomBrowser: (NSString *) iosCustomBrowser
- prefersEphemeralSession: (BOOL *) prefersEphemeralSession
+ prefersEphemeralSession: (BOOL) prefersEphemeralSession
resolve:(RCTPromiseResolveBlock) resolve
reject: (RCTPromiseRejectBlock) reject)
{
@@ -325,12 +325,12 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration
clientId: (NSString *) clientId
clientSecret: (NSString *) clientSecret
scopes: (NSArray *) scopes
- useNonce: (BOOL *) useNonce
- usePKCE: (BOOL *) usePKCE
+ useNonce: (BOOL) useNonce
+ usePKCE: (BOOL) usePKCE
additionalParameters: (NSDictionary *_Nullable) additionalParameters
skipCodeExchange: (BOOL) skipCodeExchange
iosCustomBrowser: (NSString *) iosCustomBrowser
- prefersEphemeralSession: (BOOL *) prefersEphemeralSession
+ prefersEphemeralSession: (BOOL) prefersEphemeralSession
resolve: (RCTPromiseResolveBlock) resolve
reject: (RCTPromiseRejectBlock) reject
{
@@ -489,7 +489,7 @@ - (void)endSessionWithConfiguration: (OIDServiceConfiguration *) configuration
postLogoutRedirectURL: (NSString *) postLogoutRedirectURL
additionalParameters: (NSDictionary *_Nullable) additionalParameters
iosCustomBrowser: (NSString *) iosCustomBrowser
- prefersEphemeralSession: (BOOL *) prefersEphemeralSession
+ prefersEphemeralSession: (BOOL) prefersEphemeralSession
resolve: (RCTPromiseResolveBlock) resolve
reject: (RCTPromiseRejectBlock) reject {
@@ -734,7 +734,7 @@ - (NSString*)getErrorMessage: (NSError*) error {
}
- (id<OIDExternalUserAgent>)getExternalUserAgentWithPresentingViewController: (UIViewController *)presentingViewController
- prefersEphemeralSession: (BOOL *) prefersEphemeralSession
+ prefersEphemeralSession: (BOOL) prefersEphemeralSession
{
id<OIDExternalUserAgent> externalUserAgent;
#if TARGET_OS_MACCATALYST
and it appears to work fine for my use case.
If anyone else is facing this, I used patch-package with
Thank you, I would wait for official update, if it will not take too long
Released in v8.0.0
Issue
On iOS 17.4 RN 0.74.1 NewArch + bridgelessMode ON(THIS IS IMPORTANT) authorize, refresh, logout are throwing promise rejection.
Possible unhandled promise rejection: RNAppAuth.authorize(): Error while converting JavaScript argument 10 to objectiove C type BOOL. Objective C type BOOL is unsupported.
Here
useNonce = true
by defaultATTENTION: This happening only on bridgelessMode ON. Looks like some turbo modules issue.
Environment
Azure
iOS
react-native
Version:e.g. 0.74.1
react-native-app-auth
Version:e.g. 7.1.3