react-oauth2-code-pkce
Advanced tools
Comparing version 1.4.1 to 1.4.2
@@ -39,2 +39,3 @@ "use strict"; | ||
error: null, | ||
loginInProgress: false, | ||
}); | ||
@@ -160,4 +161,4 @@ const AuthProvider = ({ authConfig, children }) => { | ||
}, []); // eslint-disable-line | ||
return react_1.default.createElement(exports.AuthContext.Provider, { value: { tokenData, token, idToken, logOut, error } }, children); | ||
return (react_1.default.createElement(exports.AuthContext.Provider, { value: { tokenData, token, idToken, logOut, error, loginInProgress } }, children)); | ||
}; | ||
exports.AuthProvider = AuthProvider; |
@@ -30,3 +30,3 @@ "use strict"; | ||
exports.logIn = logIn; | ||
// This is called a "type predicate". Which allow use to know which kind of response we got, in a type safe way. | ||
// This is called a "type predicate". Which allow us to know which kind of response we got, in a type safe way. | ||
function isTokenResponse(body) { | ||
@@ -36,7 +36,7 @@ return body.access_token !== undefined; | ||
function buildUrlEncodedRequest(tokenRequest) { | ||
let s = ''; | ||
for (const pair of Object.entries(tokenRequest)) { | ||
s += (s ? '&' : '') + pair[0] + '=' + encodeURIComponent(pair[1]); | ||
let queryString = ''; | ||
for (const [key, value] of Object.entries(tokenRequest)) { | ||
queryString += (queryString ? '&' : '') + key + '=' + encodeURIComponent(value); | ||
} | ||
return s; | ||
return queryString; | ||
} | ||
@@ -43,0 +43,0 @@ function postWithXForm(tokenEndpoint, tokenRequest) { |
@@ -38,2 +38,3 @@ import { ReactNode } from 'react'; | ||
idToken?: string; | ||
loginInProgress: boolean; | ||
} | ||
@@ -40,0 +41,0 @@ export declare type TAuthConfig = { |
{ | ||
"name": "react-oauth2-code-pkce", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Plug-and-play react package for OAuth2 Authorization Code flow with PKCE", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
25061
497