@logto/connector-apple 1.2.0 → 1.3.1

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/README.md CHANGED
@@ -82,4 +82,4 @@ See developer discussion [here](https://forums.developer.apple.com/forums/thread
82
82
 
83
83
  ## Test Apple connector
84
84
 
85
- That's it. The Apple connector should be available in both web and native apps. Don't forget to [Enable connector in sign-in experience](https://docs.logto.io/docs/tutorials/get-started/passwordless-sign-in-by-adding-connectors#enable-social-sign-in).
85
+ That's it. The Apple connector should be available in both web and native apps. Don't forget to [Enable connector in sign-in experience](https://docs.logto.io/docs/recipes/configure-connectors/social-connector/enable-social-sign-in/).
package/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ConnectorPlatform, ConnectorConfigFormItemType, ConnectorType, validateConfig, ConnectorError, ConnectorErrorCodes } from '@logto/connector-kit';
1
+ import { ConnectorPlatform, ConnectorConfigFormItemType, ConnectorType, validateConfig, ConnectorError, ConnectorErrorCodes, jsonGuard } from '@logto/connector-kit';
2
2
  import * as crypto from 'node:crypto';
3
3
  import crypto__default, { KeyObject, createPrivateKey, createPublicKey, constants, createSecretKey } from 'node:crypto';
4
4
  import { z } from 'zod';
@@ -1334,6 +1334,7 @@ const getUserInfo = (getConfig) => async (data, getSession) => {
1334
1334
  email: user?.email ??
1335
1335
  (payload.email && payload.email_verified === true ? String(payload.email) : undefined),
1336
1336
  name: [user?.name?.firstName, user?.name?.lastName].filter(Boolean).join(' ') || undefined,
1337
+ rawData: jsonGuard.parse(data),
1337
1338
  };
1338
1339
  }
1339
1340
  catch {
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@logto/connector-apple",
3
- "version": "1.2.0",
3
+ "version": "1.3.1",
4
4
  "description": "Apple web connector implementation.",
5
5
  "dependencies": {
6
- "@logto/connector-kit": "^2.1.0",
6
+ "@logto/connector-kit": "^4.0.0",
7
7
  "@logto/shared": "^3.1.0",
8
- "jose": "^5.0.0"
8
+ "@silverhand/essentials": "^2.9.1",
9
+ "got": "^14.0.0",
10
+ "jose": "^5.0.0",
11
+ "snakecase-keys": "^8.0.0",
12
+ "zod": "^3.22.4"
9
13
  },
10
14
  "main": "./lib/index.js",
11
15
  "module": "./lib/index.js",
@@ -37,6 +41,26 @@
37
41
  "publishConfig": {
38
42
  "access": "public"
39
43
  },
44
+ "devDependencies": {
45
+ "@rollup/plugin-commonjs": "^26.0.0",
46
+ "@rollup/plugin-json": "^6.1.0",
47
+ "@rollup/plugin-node-resolve": "^15.2.3",
48
+ "@rollup/plugin-typescript": "^11.1.6",
49
+ "@silverhand/eslint-config": "6.0.1",
50
+ "@silverhand/ts-config": "6.0.0",
51
+ "@types/node": "^20.11.20",
52
+ "@types/supertest": "^6.0.2",
53
+ "@vitest/coverage-v8": "^1.4.0",
54
+ "eslint": "^8.56.0",
55
+ "lint-staged": "^15.0.2",
56
+ "nock": "^13.3.1",
57
+ "prettier": "^3.0.0",
58
+ "rollup": "^4.12.0",
59
+ "rollup-plugin-output-size": "^1.3.0",
60
+ "supertest": "^7.0.0",
61
+ "typescript": "^5.3.3",
62
+ "vitest": "^1.4.0"
63
+ },
40
64
  "scripts": {
41
65
  "precommit": "lint-staged",
42
66
  "build:test": "rm -rf lib/ && tsc -p tsconfig.test.json --sourcemap",
@@ -44,8 +68,7 @@
44
68
  "dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput --incremental",
45
69
  "lint": "eslint --ext .ts src",
46
70
  "lint:report": "pnpm lint --format json --output-file report.json",
47
- "test:only": "NODE_OPTIONS=--experimental-vm-modules jest",
48
- "test": "pnpm build:test && pnpm test:only",
49
- "test:ci": "pnpm test:only --silent --coverage"
71
+ "test": "vitest src",
72
+ "test:ci": "pnpm run test --silent --coverage"
50
73
  }
51
74
  }