@axa-fr/react-oidc 7.0.1-alpha.996 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -158,6 +158,8 @@ function _hideTokens(tokens, currentDatabaseElement, configurationName) {
|
|
|
158
158
|
if (!tokens.issued_at) {
|
|
159
159
|
const currentTimeUnixSecond = (/* @__PURE__ */ new Date()).getTime() / 1e3;
|
|
160
160
|
tokens.issued_at = currentTimeUnixSecond;
|
|
161
|
+
} else if (typeof tokens.issued_at == "string") {
|
|
162
|
+
tokens.issued_at = parseInt(tokens.issued_at, 10);
|
|
161
163
|
}
|
|
162
164
|
const accessTokenPayload = extractTokenPayload(tokens.access_token);
|
|
163
165
|
const secureTokens = {
|
|
@@ -181,8 +183,9 @@ function _hideTokens(tokens, currentDatabaseElement, configurationName) {
|
|
|
181
183
|
if (tokens.refresh_token) {
|
|
182
184
|
secureTokens.refresh_token = TOKEN.REFRESH_TOKEN + "_" + configurationName;
|
|
183
185
|
}
|
|
186
|
+
const expireIn = typeof tokens.expires_in == "string" ? parseInt(tokens.expires_in, 10) : tokens.expires_in;
|
|
184
187
|
const idTokenExpiresAt = _idTokenPayload && _idTokenPayload.exp ? _idTokenPayload.exp : Number.MAX_VALUE;
|
|
185
|
-
const accessTokenExpiresAt = accessTokenPayload && accessTokenPayload.exp ? accessTokenPayload.exp : tokens.issued_at +
|
|
188
|
+
const accessTokenExpiresAt = accessTokenPayload && accessTokenPayload.exp ? accessTokenPayload.exp : tokens.issued_at + expireIn;
|
|
186
189
|
let expiresAt;
|
|
187
190
|
const tokenRenewMode = currentDatabaseElement.oidcConfiguration.token_renew_mode;
|
|
188
191
|
if (tokenRenewMode === TokenRenewMode.access_token_invalid) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axa-fr/react-oidc",
|
|
3
|
-
"version": "7.0.1
|
|
3
|
+
"version": "7.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"lint": "eslint src"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@axa-fr/oidc-client-service-worker": "7.0.1
|
|
44
|
-
"@axa-fr/oidc-client": "7.0.1
|
|
43
|
+
"@axa-fr/oidc-client-service-worker": "7.0.1",
|
|
44
|
+
"@axa-fr/oidc-client": "7.0.1",
|
|
45
45
|
"base64-js": "1.5.1"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|