@axa-fr/react-oidc 6.16.6 → 6.16.7

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.
@@ -1 +1 @@
1
- {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/oidc/vanilla/user.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,6BAmCzB,CAAC"}
1
+ {"version":3,"file":"user.d.ts","sourceRoot":"","sources":["../../src/oidc/vanilla/user.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,aAAa,6BAoCzB,CAAC"}
@@ -13,6 +13,10 @@ export const userInfoAsync = (oidc) => __awaiter(void 0, void 0, void 0, functio
13
13
  if (oidc.userInfo != null) {
14
14
  return oidc.userInfo;
15
15
  }
16
+ // We wait the synchronisation before making a request
17
+ while (oidc.tokens && !isTokensValid(oidc.tokens)) {
18
+ yield sleepAsync(200);
19
+ }
16
20
  if (!oidc.tokens) {
17
21
  return null;
18
22
  }
@@ -20,10 +24,6 @@ export const userInfoAsync = (oidc) => __awaiter(void 0, void 0, void 0, functio
20
24
  if (!accessToken) {
21
25
  return null;
22
26
  }
23
- // We wait the synchronisation before making a request
24
- while (oidc.tokens && !isTokensValid(oidc.tokens)) {
25
- yield sleepAsync(200);
26
- }
27
27
  const oidcServerConfiguration = yield oidc.initAsync(oidc.configuration.authority, oidc.configuration.authority_configuration);
28
28
  const url = oidcServerConfiguration.userInfoEndpoint;
29
29
  const fetchUserInfo = (accessToken) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"user.js","sourceRoot":"","sources":["../../src/oidc/vanilla/user.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAO,IAAI,EAAE,EAAE;IACxC,IAAI,IAAI,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  "name": "@axa-fr/react-oidc",
3
- "version": "6.16.6",
3
+ "version": "6.16.7",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -5,6 +5,12 @@ export const userInfoAsync = async (oidc) => {
5
5
  if (oidc.userInfo != null) {
6
6
  return oidc.userInfo;
7
7
  }
8
+
9
+ // We wait the synchronisation before making a request
10
+ while (oidc.tokens && !isTokensValid(oidc.tokens)) {
11
+ await sleepAsync(200);
12
+ }
13
+
8
14
  if (!oidc.tokens) {
9
15
  return null;
10
16
  }
@@ -13,11 +19,6 @@ export const userInfoAsync = async (oidc) => {
13
19
  return null;
14
20
  }
15
21
 
16
- // We wait the synchronisation before making a request
17
- while (oidc.tokens && !isTokensValid(oidc.tokens)) {
18
- await sleepAsync(200);
19
- }
20
-
21
22
  const oidcServerConfiguration = await oidc.initAsync(oidc.configuration.authority, oidc.configuration.authority_configuration);
22
23
  const url = oidcServerConfiguration.userInfoEndpoint;
23
24
  const fetchUserInfo = async (accessToken) => {