react-oauth2-code-pkce
Advanced tools
Comparing version 1.6.1 to 1.7.0
@@ -22,2 +22,3 @@ "use strict"; | ||
code_challenge_method: 'S256', | ||
...config.extraAuthParameters, | ||
}); | ||
@@ -85,3 +86,5 @@ // Call any preLogin function in authConfig | ||
code_verifier: codeVerifier, | ||
// TODO: Remove in 2.0 | ||
...config.extraAuthParams, | ||
...config.extraTokenParameters, | ||
}; | ||
@@ -88,0 +91,0 @@ return postWithXForm(config.tokenEndpoint, tokenRequest); |
@@ -56,2 +56,8 @@ import { ReactNode } from 'react'; | ||
}; | ||
extraAuthParameters?: { | ||
[key: string]: string | boolean | number; | ||
}; | ||
extraTokenParameters?: { | ||
[key: string]: string | boolean | number; | ||
}; | ||
}; | ||
@@ -75,3 +81,9 @@ export declare type TAzureADErrorResponse = { | ||
}; | ||
extraAuthParameters?: { | ||
[key: string]: string | boolean | number; | ||
}; | ||
extraTokenParameters?: { | ||
[key: string]: string | boolean | number; | ||
}; | ||
}; | ||
export {}; |
@@ -17,3 +17,9 @@ "use strict"; | ||
throw Error("'redirectUri' must be set in the 'AuthConfig' object passed to 'react-oauth2-code-pkce' AuthProvider"); | ||
if (config?.extraAuthParams) | ||
console.warn("The 'extraAuthParams' configuration parameter will be deprecated. You should use " + | ||
"'extraTokenParameters' instead."); | ||
if (config?.extraAuthParams && config?.extraTokenParameters) | ||
console.warn("Using both 'extraAuthParams' and 'extraTokenParameters' is not recommended. " + | ||
"They do the same thing, and you should only use 'extraTokenParameters'"); | ||
} | ||
exports.validateAuthConfig = validateAuthConfig; |
{ | ||
"name": "react-oauth2-code-pkce", | ||
"version": "1.6.1", | ||
"version": "1.7.0", | ||
"description": "Plug-and-play react package for OAuth2 Authorization Code flow with PKCE", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -34,4 +34,4 @@ # react-oauth2-pkce · [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/soofstad/react-oauth2-pkce/blob/main/LICENSE) [![npm version](https://img.shields.io/npm/v/react-oauth2-code-pkce)](https://www.npmjs.com/package/react-oauth2-code-pkce) ![CI](https://github.com/soofstad/react-oauth2-pkce/actions/workflows/tests.yaml/badge.svg) | ||
clientId: 'myClientID', | ||
authorizationEndpoint: 'myAuthEndpoint', | ||
tokenEndpoint: 'myTokenEndpoint', | ||
authorizationEndpoint: 'https://myAuthProvider.com/auth', | ||
tokenEndpoint: 'https://myAuthProvider.com/token', | ||
redirectUri: 'http://localhost:3000/', | ||
@@ -137,3 +137,7 @@ scope: 'someScope openid', | ||
autoLogin?: boolean // default: true | ||
// Can be used to provide any non-standard parameters to the authorization request | ||
// Can be used to provide any non-standard parameters to the authentication request | ||
extraAuthParameters?: { [key: string]: string | boolean | number } // default: null | ||
// Can be used to provide any non-standard parameters to the token request | ||
extraTokenParameters?: { [key: string]: string | boolean | number } // default: null | ||
// Superseded by 'extraTokenParameters' options. Will be deprecated in 2.0 | ||
extraAuthParams?: { [key: string]: string | boolean | number } // default: null | ||
@@ -140,0 +144,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
28629
533
155