@verdocs/js-sdk 4.2.90 → 4.2.91
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.
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1321,15 +1321,15 @@ class VerdocsEndpoint {
|
|
|
1321
1321
|
this.sessionType = sessionType;
|
|
1322
1322
|
if (this.sessionType === 'user') {
|
|
1323
1323
|
this.api.defaults.headers.common.Authorization = `Bearer ${token}`;
|
|
1324
|
+
if (this.persist) {
|
|
1325
|
+
localStorage.setItem(this.sessionStorageKey(), token);
|
|
1326
|
+
}
|
|
1324
1327
|
}
|
|
1325
1328
|
else {
|
|
1326
1329
|
// Required for legacy calls to rForm
|
|
1327
1330
|
this.api.defaults.headers.common.signer = `Bearer ${token}`;
|
|
1328
1331
|
this.api.defaults.headers.common.Authorization = `Bearer ${token}`;
|
|
1329
1332
|
}
|
|
1330
|
-
if (this.persist && sessionType === 'user') {
|
|
1331
|
-
localStorage.setItem(this.sessionStorageKey(), token);
|
|
1332
|
-
}
|
|
1333
1333
|
if (this.sessionType === 'user') {
|
|
1334
1334
|
window?.console?.debug('[JS_SDK] Loading current profile...', this.endpointId, this.sub, session.sub);
|
|
1335
1335
|
getCurrentProfile(this)
|
|
@@ -1680,7 +1680,7 @@ const startSigningSession = async (endpoint, envelope_id, role_name, key) => {
|
|
|
1680
1680
|
return endpoint.api //
|
|
1681
1681
|
.post(`/v2/sign/unauth/${envelope_id}/${encodeURIComponent(role_name)}/${key}`)
|
|
1682
1682
|
.then((r) => {
|
|
1683
|
-
endpoint.setToken(r.data.access_token);
|
|
1683
|
+
endpoint.setToken(r.data.access_token, 'signing');
|
|
1684
1684
|
return r.data;
|
|
1685
1685
|
});
|
|
1686
1686
|
};
|