Skip to content

Commit f8fe119

Browse files
authored
Re-add additional praneters for backwards compatibility (#250)
1 parent 1fd30d1 commit f8fe119

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ This is the result from the auth server
108108
* **accessTokenExpirationDate** - (`string`) the token expiration date
109109
* **authorizeAdditionalParameters** - (`Object`) additional url parameters from the authorizationEndpoint response.
110110
* **tokenAdditionalParameters** - (`Object`) additional url parameters from the tokenEndpoint response.
111+
* **additionalParameters** - (`Object`) :warning: _DEPRECATED_ legacy implementation. Will be removed in a future release. Returns just `tokenAdditionalParameters` for Android and `authorizeAdditionalParameters` on iOS
111112
* **idToken** - (`string`) the id token
112113
* **refreshToken** - (`string`) the refresh token
113114
* **tokenType** - (`string`) the token type, e.g. Bearer

android/src/main/java/com/rnappauth/utils/TokenResponseFactory.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ public static final WritableMap tokenResponseToMap(TokenResponse response, Autho
7070
map.putString("accessToken", response.accessToken);
7171
map.putMap("authorizeAdditionalParameters", createAdditionalParametersMap(authResponse.additionalParameters));
7272
map.putMap("tokenAdditionalParameters", createAdditionalParametersMap(response.additionalParameters));
73+
map.putMap("additionalParameters", createAdditionalParametersMap(response.additionalParameters)); // DEPRECATED
7374
map.putString("idToken", response.idToken);
7475
map.putString("refreshToken", response.refreshToken);
7576
map.putString("tokenType", response.tokenType);

ios/RNAppAuth.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,7 @@ - (NSDictionary*)formatResponse: (OIDTokenResponse*) response
290290
@"accessTokenExpirationDate": response.accessTokenExpirationDate ? [dateFormat stringFromDate:response.accessTokenExpirationDate] : @"",
291291
@"authorizeAdditionalParameters": authResponse.additionalParameters,
292292
@"tokenAdditionalParameters": response.additionalParameters,
293+
@"additionalParameters": authResponse.additionalParameters, /* DEPRECATED */
293294
@"idToken": response.idToken ? response.idToken : @"",
294295
@"refreshToken": response.refreshToken ? response.refreshToken : @"",
295296
@"tokenType": response.tokenType ? response.tokenType : @"",

0 commit comments

Comments
 (0)