@lowdefy/api 4.0.0-alpha.18 → 4.0.0-alpha.19

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.
@@ -13,11 +13,12 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import { get } from '@lowdefy/helpers';
16
- function addUserFieldsToToken(context, { account , authConfig , profile , token }) {
16
+ function addUserFieldsToToken(context, { account , authConfig , profile , token , user }) {
17
17
  // const { debug } = context.logger;
18
18
  const objects = {
19
19
  account,
20
- profile
20
+ profile,
21
+ user
21
22
  };
22
23
  // TODO: Add when debug is fixed.
23
24
  // debug('Adding userFields to user. Available provider data is:');
@@ -46,12 +46,15 @@ function createJWTCallback(context, { authConfig , plugins }) {
46
46
  updated_at,
47
47
  ...token
48
48
  };
49
+ }
50
+ if (profile || user) {
49
51
  if (authConfig.userFields) {
50
52
  addUserFieldsToToken(context, {
51
53
  authConfig,
52
54
  account,
53
55
  profile,
54
- token
56
+ token,
57
+ user
55
58
  });
56
59
  }
57
60
  }
@@ -53,6 +53,7 @@ function getNextAuthConfig(context, { authJson , plugins }) {
53
53
  });
54
54
  nextAuthConfig.session = authConfig.session;
55
55
  nextAuthConfig.theme = authConfig.theme;
56
+ nextAuthConfig.cookies = authConfig?.advanced?.cookies;
56
57
  initialized = true;
57
58
  return nextAuthConfig;
58
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/api",
3
- "version": "4.0.0-alpha.18",
3
+ "version": "4.0.0-alpha.19",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -41,12 +41,12 @@
41
41
  "test": "yarn node --experimental-vm-modules $(yarn bin jest)"
42
42
  },
43
43
  "dependencies": {
44
- "@lowdefy/ajv": "4.0.0-alpha.18",
45
- "@lowdefy/helpers": "4.0.0-alpha.18",
46
- "@lowdefy/node-utils": "4.0.0-alpha.18",
47
- "@lowdefy/nunjucks": "4.0.0-alpha.18",
48
- "@lowdefy/operators": "4.0.0-alpha.18",
49
- "@lowdefy/operators-js": "4.0.0-alpha.18"
44
+ "@lowdefy/ajv": "4.0.0-alpha.19",
45
+ "@lowdefy/helpers": "4.0.0-alpha.19",
46
+ "@lowdefy/node-utils": "4.0.0-alpha.19",
47
+ "@lowdefy/nunjucks": "4.0.0-alpha.19",
48
+ "@lowdefy/operators": "4.0.0-alpha.19",
49
+ "@lowdefy/operators-js": "4.0.0-alpha.19"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@jest/globals": "28.1.0",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "access": "public"
60
60
  },
61
- "gitHead": "9ba94a9ab39be2a165b3a58043fbb33f26b48ae3"
61
+ "gitHead": "5240a074f7225295a8c92aaf0236b7680c296b57"
62
62
  }