@data-fair/lib-node 2.10.1 → 2.10.2

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/session.js +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-node",
3
- "version": "2.10.1",
3
+ "version": "2.10.2",
4
4
  "description": "Small nodejs related utility functions for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
package/session.js CHANGED
@@ -29,7 +29,9 @@ export class SessionHandler {
29
29
  session.dark = cookies.theme_dark === '1' || cookies.theme_dark === 'true';
30
30
  if (cookies.i18n_lang)
31
31
  session.lang = cookies.i18n_lang;
32
- if (!cookies.id_token || !cookies.id_token_sign)
32
+ if (!cookies.id_token)
33
+ return session;
34
+ if (!cookies.id_token_sign && !onlyDecode)
33
35
  return session;
34
36
  const token = cookies.id_token + '.' + cookies.id_token_sign;
35
37
  let user;