react-oauth2-code-pkce
Advanced tools
Comparing version 1.15.0 to 1.15.1
@@ -70,3 +70,3 @@ "use strict"; | ||
setError(null); | ||
if (config === null || config === void 0 ? void 0 : config.logoutEndpoint) | ||
if ((config === null || config === void 0 ? void 0 : config.logoutEndpoint) && token) | ||
(0, authentication_1.redirectToLogout)(config, token, refreshToken, idToken, state, logoutHint); | ||
@@ -185,6 +185,8 @@ } | ||
// This should not happen. There should be a 'code' parameter in the url by now..." | ||
const error_description = urlParams.get('error_description') || 'Bad authorization state. Refreshing the page might solve the issue.'; | ||
console.error(error_description); | ||
const error_description = urlParams.get('error_description') || | ||
'Bad authorization state. Refreshing the page and log in again might solve the issue.'; | ||
console.error(error_description + | ||
"\nExpected to find a '?code=' parameter in the URL by now. Did the authentication get aborted or interrupted?"); | ||
setError(error_description); | ||
logOut(); | ||
clearStorage(); | ||
return; | ||
@@ -191,0 +193,0 @@ } |
{ | ||
"name": "react-oauth2-code-pkce", | ||
"version": "1.15.0", | ||
"version": "1.15.1", | ||
"description": "Provider agnostic react package for OAuth2 Authorization Code flow with PKCE", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -13,4 +13,5 @@ # react-oauth2-code-pkce · [](https://github.com/soofstad/react-oauth2-pkce/blob/main/LICENSE) [](https://www.npmjs.com/package/react-oauth2-code-pkce)  | ||
Long version; | ||
<https://oauth.net/2/pkce/> | ||
<https://datatracker.ietf.org/doc/html/rfc7636> | ||
<https://www.rfc-editor.org/rfc/rfc6749.html> | ||
<https://datatracker.ietf.org/doc/html/rfc7636> | ||
<https://oauth.net/2/pkce/> | ||
@@ -17,0 +18,0 @@ ## Features |
46389
754
194