@arcblock/did-connect-react 3.1.35 → 3.1.37
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.
|
@@ -146,9 +146,11 @@ function Ve({
|
|
|
146
146
|
const { loginToken: t, csrfToken: s, sessionToken: o, refreshToken: f, visitorId: a, encrypted: l = !0 } = n, L = t || o;
|
|
147
147
|
let S, E, U;
|
|
148
148
|
if (L) {
|
|
149
|
-
S = l ? p(L) : L, u("handleLoginResult: setSessionToken", { decryptSessionToken: S }), v(S)
|
|
150
|
-
|
|
151
|
-
|
|
149
|
+
if (S = l ? p(L) : L, u("handleLoginResult: setSessionToken", { decryptSessionToken: S }), v(S), s) {
|
|
150
|
+
const re = l ? p(s) : s;
|
|
151
|
+
Q(re);
|
|
152
|
+
}
|
|
153
|
+
f && (E = l ? p(f) : f, u("handleLoginResult: setRefreshToken", { decryptRefreshToken: E }), g(E));
|
|
152
154
|
}
|
|
153
155
|
a && (U = l ? p(a) : a, u("handleLoginResult: setVisitorId", { decryptVisitorId: U }), se(U));
|
|
154
156
|
});
|
package/lib/package.json.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/did-connect-react",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.37",
|
|
4
4
|
"description": "Client side library to work with DID Connect by ArcBlock.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"url": "https://github.com/ArcBlock/ux/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@arcblock/bridge": "3.1.
|
|
35
|
+
"@arcblock/bridge": "3.1.37",
|
|
36
36
|
"@arcblock/did": "^1.21.3",
|
|
37
|
-
"@arcblock/icons": "3.1.
|
|
38
|
-
"@arcblock/react-hooks": "3.1.
|
|
37
|
+
"@arcblock/icons": "3.1.37",
|
|
38
|
+
"@arcblock/react-hooks": "3.1.37",
|
|
39
39
|
"@arcblock/ws": "^1.21.3",
|
|
40
40
|
"@fontsource/lexend": "^5.2.9",
|
|
41
41
|
"@iconify-icons/logos": "^1.2.36",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
81
81
|
"jest": "^29.7.0"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "2b0893787889c20893e9ff1f8c7a016f386882b4"
|
|
84
84
|
}
|
|
@@ -338,8 +338,10 @@ export default function useSessionToken({
|
|
|
338
338
|
debug('handleLoginResult: setSessionToken', { decryptSessionToken });
|
|
339
339
|
setSessionToken(decryptSessionToken);
|
|
340
340
|
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
if (csrfToken) {
|
|
342
|
+
const decryptCsrfToken = encrypted ? decrypt(csrfToken) : csrfToken;
|
|
343
|
+
setCsrfToken(decryptCsrfToken);
|
|
344
|
+
}
|
|
343
345
|
|
|
344
346
|
if (refreshToken) {
|
|
345
347
|
decryptRefreshToken = encrypted ? decrypt(refreshToken) : refreshToken;
|