From f0014cfce452a092c4990d17c1988dc149654fb2 Mon Sep 17 00:00:00 2001 From: Joe Hobson Date: Wed, 15 May 2024 15:03:52 +0100 Subject: [PATCH 1/4] fix: remove duplicate state --- ios/RNAppAuth.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ios/RNAppAuth.m b/ios/RNAppAuth.m index eb11aa559..6b0e387ad 100644 --- a/ios/RNAppAuth.m +++ b/ios/RNAppAuth.m @@ -338,6 +338,9 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration NSString *codeVerifier = usePKCE ? [[self class] generateCodeVerifier] : nil; NSString *codeChallenge = usePKCE ? [[self class] codeChallengeS256ForVerifier:codeVerifier] : nil; NSString *nonce = useNonce ? additionalParameters[@"nonce"]? additionalParameters[@"nonce"]: [[self class] generateState] : nil ; + + NSMutableDictionary* mutableDict = [additionalParameters mutableCopy]; + [mutableDict removeObjectForKey:@"state"]; // builds authentication request OIDAuthorizationRequest *request = @@ -353,7 +356,7 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration codeVerifier:codeVerifier codeChallenge:codeChallenge codeChallengeMethod: usePKCE ? OIDOAuthorizationRequestCodeChallengeMethodS256 : nil - additionalParameters:additionalParameters]; + additionalParameters:[mutableDict copy]]; // performs authentication request id appDelegate = (id)[UIApplication sharedApplication].delegate; From 14f2eabba6a9b98766ddab27619a2ee1264b7e3c Mon Sep 17 00:00:00 2001 From: Joe Hobson Date: Wed, 15 May 2024 15:30:24 +0100 Subject: [PATCH 2/4] Create cuddly-rules-behave.md --- .changeset/cuddly-rules-behave.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/cuddly-rules-behave.md diff --git a/.changeset/cuddly-rules-behave.md b/.changeset/cuddly-rules-behave.md new file mode 100644 index 000000000..65bf91c8e --- /dev/null +++ b/.changeset/cuddly-rules-behave.md @@ -0,0 +1,5 @@ +--- +'react-native-app-auth': minor +--- + +#965 remove duplicate state key From c6c6b020e1c4a8639c6acfe87ea374f5e09b635b Mon Sep 17 00:00:00 2001 From: bryceknz <25199713+bryceknz@users.noreply.github.com> Date: Mon, 18 May 2026 14:38:17 +0100 Subject: [PATCH 3/4] fix(ios): avoid duplicate auth nonce parameter --- packages/react-native-app-auth/ios/RNAppAuth.m | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-app-auth/ios/RNAppAuth.m b/packages/react-native-app-auth/ios/RNAppAuth.m index 0577a413f..ed51141d0 100644 --- a/packages/react-native-app-auth/ios/RNAppAuth.m +++ b/packages/react-native-app-auth/ios/RNAppAuth.m @@ -341,6 +341,7 @@ - (void)authorizeWithConfiguration: (OIDServiceConfiguration *) configuration NSMutableDictionary* mutableDict = [additionalParameters mutableCopy]; [mutableDict removeObjectForKey:@"state"]; + [mutableDict removeObjectForKey:@"nonce"]; // builds authentication request OIDAuthorizationRequest *request = From e838d7d1d4152b2bea10c464798f9ee72d39e7b0 Mon Sep 17 00:00:00 2001 From: bryceknz <25199713+bryceknz@users.noreply.github.com> Date: Mon, 18 May 2026 14:40:09 +0100 Subject: [PATCH 4/4] changeset: patch duplicate iOS auth parameters --- .changeset/cuddly-rules-behave.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.changeset/cuddly-rules-behave.md b/.changeset/cuddly-rules-behave.md index 65bf91c8e..2eb022ac6 100644 --- a/.changeset/cuddly-rules-behave.md +++ b/.changeset/cuddly-rules-behave.md @@ -1,5 +1,5 @@ --- -'react-native-app-auth': minor +'react-native-app-auth': patch --- -#965 remove duplicate state key +Remove duplicate iOS auth `state` and `nonce` parameters.