@logto/connector-apple 1.4.0 → 1.4.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/lib/index.js CHANGED
@@ -173,8 +173,8 @@ var createAppleConnector = async ({ getConfig }) => {
173
173
  getUserInfo: getUserInfo(getConfig)
174
174
  };
175
175
  };
176
- var src_default = createAppleConnector;
176
+ var index_default = createAppleConnector;
177
177
  export {
178
- src_default as default
178
+ index_default as default
179
179
  };
180
180
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/constant.ts","../src/types.ts"],"sourcesContent":["import { assert } from '@silverhand/essentials';\n\nimport type {\n GetAuthorizationUri,\n GetUserInfo,\n GetConnectorConfig,\n CreateConnector,\n SocialConnector,\n} from '@logto/connector-kit';\nimport {\n ConnectorError,\n ConnectorErrorCodes,\n validateConfig,\n ConnectorType,\n jsonGuard,\n} from '@logto/connector-kit';\nimport { generateStandardId } from '@logto/shared/universal';\nimport { createRemoteJWKSet, jwtVerify } from 'jose';\n\nimport { defaultMetadata, jwksUri, issuer, authorizationEndpoint } from './constant.js';\nimport { appleConfigGuard, dataGuard } from './types.js';\n\nconst generateNonce = () => generateStandardId();\n\nconst getAuthorizationUri =\n (getConfig: GetConnectorConfig): GetAuthorizationUri =>\n async ({ state, redirectUri }, setSession) => {\n const config = await getConfig(defaultMetadata.id);\n\n validateConfig(config, appleConfigGuard);\n\n const nonce = generateNonce();\n\n const queryParameters = new URLSearchParams({\n client_id: config.clientId,\n redirect_uri: redirectUri,\n scope: config.scope ?? '',\n state,\n nonce,\n // https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332113\n response_type: 'code id_token',\n response_mode: 'form_post',\n });\n\n assert(\n setSession,\n new ConnectorError(ConnectorErrorCodes.NotImplemented, {\n message: \"'setSession' is not implemented.\",\n })\n );\n await setSession({ nonce });\n\n return `${authorizationEndpoint}?${queryParameters.toString()}`;\n };\n\nconst getUserInfo =\n (getConfig: GetConnectorConfig): GetUserInfo =>\n async (data, getSession) => {\n const { id_token: idToken, user } = await authorizationCallbackHandler(data);\n\n if (!idToken) {\n throw new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid);\n }\n\n const config = await getConfig(defaultMetadata.id);\n validateConfig(config, appleConfigGuard);\n\n const { clientId } = config;\n\n try {\n const { payload } = await jwtVerify(idToken, createRemoteJWKSet(new URL(jwksUri)), {\n issuer,\n audience: clientId,\n });\n\n if (payload.nonce) {\n // TODO @darcy: need to specify error code\n assert(\n getSession,\n new ConnectorError(ConnectorErrorCodes.NotImplemented, {\n message: \"'getSession' is not implemented.\",\n })\n );\n const { nonce: validationNonce } = await getSession();\n\n assert(\n validationNonce,\n new ConnectorError(ConnectorErrorCodes.General, {\n message: \"'nonce' not presented in session storage.\",\n })\n );\n\n assert(\n validationNonce === payload.nonce,\n new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid, {\n message: \"IdToken validation failed due to 'nonce' mismatch.\",\n })\n );\n }\n\n if (!payload.sub) {\n throw new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid);\n }\n\n return {\n id: payload.sub,\n // The `user` object is only available at the first sign-in. Didn't find this in Apple's\n // docs but it seems to be the case. Fallback to the `email` field in the ID token just in\n // case.\n // See desperate developer discussion here:\n // https://forums.developer.apple.com/forums/thread/132223\n email:\n user?.email ??\n (payload.email && payload.email_verified === true ? String(payload.email) : undefined),\n name: [user?.name?.firstName, user?.name?.lastName].filter(Boolean).join(' ') || undefined,\n rawData: jsonGuard.parse(data),\n };\n } catch {\n throw new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid);\n }\n };\n\nconst authorizationCallbackHandler = async (parameterObject: unknown) => {\n const result = dataGuard.safeParse(parameterObject);\n\n if (!result.success) {\n throw new ConnectorError(ConnectorErrorCodes.General, JSON.stringify(parameterObject));\n }\n\n return result.data;\n};\n\nconst createAppleConnector: CreateConnector<SocialConnector> = async ({ getConfig }) => {\n return {\n metadata: defaultMetadata,\n type: ConnectorType.Social,\n configGuard: appleConfigGuard,\n getAuthorizationUri: getAuthorizationUri(getConfig),\n getUserInfo: getUserInfo(getConfig),\n };\n};\n\nexport default createAppleConnector;\n","import type { ConnectorMetadata } from '@logto/connector-kit';\nimport { ConnectorPlatform, ConnectorConfigFormItemType } from '@logto/connector-kit';\n\n// https://appleid.apple.com/.well-known/openid-configuration\nexport const issuer = 'https://appleid.apple.com';\nexport const authorizationEndpoint = `${issuer}/auth/authorize`;\nexport const accessTokenEndpoint = `${issuer}/auth/token`;\nexport const jwksUri = `${issuer}/auth/keys`;\n\nexport const defaultMetadata: ConnectorMetadata = {\n id: 'apple-universal',\n target: 'apple',\n platform: ConnectorPlatform.Universal,\n name: {\n en: 'Apple',\n 'zh-CN': 'Apple',\n 'tr-TR': 'Apple',\n ko: 'Apple',\n },\n logo: './logo.svg',\n logoDark: './logo-dark.svg',\n description: {\n en: 'Apple is a multinational high-end provider of hardware and software.',\n 'zh-CN': 'Apple 是全球领先的高端消费者软硬件提供商。',\n 'tr-TR': 'Apple, çok uluslu bir üst düzey donanım ve yazılım sağlayıcısıdır.',\n ko: 'Apple은 하드웨어와 소프트웨어의 다국적 공급자 입니다.',\n },\n readme: './README.md',\n formItems: [\n {\n key: 'clientId',\n type: ConnectorConfigFormItemType.Text,\n required: true,\n label: 'Identifier',\n placeholder: '<your-registered-identifier>',\n },\n {\n key: 'scope',\n type: ConnectorConfigFormItemType.Text,\n required: false,\n label: 'Scope',\n placeholder: 'email name',\n },\n ],\n};\n\nexport const defaultTimeout = 5000;\n","import { z } from 'zod';\n\nexport const appleConfigGuard = z.object({\n clientId: z.string(),\n scope: z.string().optional(),\n});\n\nexport type AppleConfig = z.infer<typeof appleConfigGuard>;\n\nconst stringToJson = () =>\n z.string().transform((value, ctx): z.ZodType<JSON> => {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(value);\n } catch {\n ctx.addIssue({ code: 'custom', message: 'Invalid JSON' });\n return z.NEVER;\n }\n });\n\n// https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/configuring_your_webpage_for_sign_in_with_apple#3331292\n// https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332113\nexport const dataGuard = z.object({\n id_token: z.string(),\n user: stringToJson()\n .pipe(\n z\n .object({\n name: z\n .object({\n firstName: z.string(),\n lastName: z.string(),\n })\n .partial(),\n email: z.string(),\n })\n .partial()\n )\n .optional(),\n});\n"],"mappings":";AAAA,SAAS,cAAc;AASvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,SAAS,oBAAoB,iBAAiB;;;AChB9C,SAAS,mBAAmB,mCAAmC;AAGxD,IAAM,SAAS;AACf,IAAM,wBAAwB,GAAG,MAAM;AACvC,IAAM,sBAAsB,GAAG,MAAM;AACrC,IAAM,UAAU,GAAG,MAAM;AAEzB,IAAM,kBAAqC;AAAA,EAChD,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,UAAU,kBAAkB;AAAA,EAC5B,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,IAAI;AAAA,EACN;AAAA,EACA,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,IACX,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,IAAI;AAAA,EACN;AAAA,EACA,QAAQ;AAAA,EACR,WAAW;AAAA,IACT;AAAA,MACE,KAAK;AAAA,MACL,MAAM,4BAA4B;AAAA,MAClC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,aAAa;AAAA,IACf;AAAA,IACA;AAAA,MACE,KAAK;AAAA,MACL,MAAM,4BAA4B;AAAA,MAClC,UAAU;AAAA,MACV,OAAO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QAAQ,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,MACjF,SAAS,UAAU,MAAM,IAAI;AAAA,IAC/B;AAAA,EACF,QAAQ;AACN,UAAM,IAAI,eAAe,oBAAoB,oBAAoB;AAAA,EACnE;AACF;AAEF,IAAM,+BAA+B,OAAO,oBAA6B;AACvE,QAAM,SAAS,UAAU,UAAU,eAAe;AAElD,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,eAAe,oBAAoB,SAAS,KAAK,UAAU,eAAe,CAAC;AAAA,EACvF;AAEA,SAAO,OAAO;AAChB;AAEA,IAAM,uBAAyD,OAAO,EAAE,UAAU,MAAM;AACtF,SAAO;AAAA,IACL,UAAU;AAAA,IACV,MAAM,cAAc;AAAA,IACpB,aAAa;AAAA,IACb,qBAAqB,oBAAoB,SAAS;AAAA,IAClD,aAAa,YAAY,SAAS;AAAA,EACpC;AACF;AAEA,IAAO,cAAQ;","names":[]}
1
+ {"version":3,"sources":["../src/index.ts","../src/constant.ts","../src/types.ts"],"sourcesContent":["import { assert } from '@silverhand/essentials';\n\nimport type {\n GetAuthorizationUri,\n GetUserInfo,\n GetConnectorConfig,\n CreateConnector,\n SocialConnector,\n} from '@logto/connector-kit';\nimport {\n ConnectorError,\n ConnectorErrorCodes,\n validateConfig,\n ConnectorType,\n jsonGuard,\n} from '@logto/connector-kit';\nimport { generateStandardId } from '@logto/shared/universal';\nimport { createRemoteJWKSet, jwtVerify } from 'jose';\n\nimport { defaultMetadata, jwksUri, issuer, authorizationEndpoint } from './constant.js';\nimport { appleConfigGuard, dataGuard } from './types.js';\n\nconst generateNonce = () => generateStandardId();\n\nconst getAuthorizationUri =\n (getConfig: GetConnectorConfig): GetAuthorizationUri =>\n async ({ state, redirectUri }, setSession) => {\n const config = await getConfig(defaultMetadata.id);\n\n validateConfig(config, appleConfigGuard);\n\n const nonce = generateNonce();\n\n const queryParameters = new URLSearchParams({\n client_id: config.clientId,\n redirect_uri: redirectUri,\n scope: config.scope ?? '',\n state,\n nonce,\n // https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332113\n response_type: 'code id_token',\n response_mode: 'form_post',\n });\n\n assert(\n setSession,\n new ConnectorError(ConnectorErrorCodes.NotImplemented, {\n message: \"'setSession' is not implemented.\",\n })\n );\n await setSession({ nonce });\n\n return `${authorizationEndpoint}?${queryParameters.toString()}`;\n };\n\nconst getUserInfo =\n (getConfig: GetConnectorConfig): GetUserInfo =>\n async (data, getSession) => {\n const { id_token: idToken, user } = await authorizationCallbackHandler(data);\n\n if (!idToken) {\n throw new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid);\n }\n\n const config = await getConfig(defaultMetadata.id);\n validateConfig(config, appleConfigGuard);\n\n const { clientId } = config;\n\n try {\n const { payload } = await jwtVerify(idToken, createRemoteJWKSet(new URL(jwksUri)), {\n issuer,\n audience: clientId,\n });\n\n if (payload.nonce) {\n // TODO @darcy: need to specify error code\n assert(\n getSession,\n new ConnectorError(ConnectorErrorCodes.NotImplemented, {\n message: \"'getSession' is not implemented.\",\n })\n );\n const { nonce: validationNonce } = await getSession();\n\n assert(\n validationNonce,\n new ConnectorError(ConnectorErrorCodes.General, {\n message: \"'nonce' not presented in session storage.\",\n })\n );\n\n assert(\n validationNonce === payload.nonce,\n new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid, {\n message: \"IdToken validation failed due to 'nonce' mismatch.\",\n })\n );\n }\n\n if (!payload.sub) {\n throw new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid);\n }\n\n return {\n id: payload.sub,\n // The `user` object is only available at the first sign-in. Didn't find this in Apple's\n // docs but it seems to be the case. Fallback to the `email` field in the ID token just in\n // case.\n // See desperate developer discussion here:\n // https://forums.developer.apple.com/forums/thread/132223\n email:\n user?.email ??\n (payload.email && payload.email_verified === true ? String(payload.email) : undefined),\n name: [user?.name?.firstName, user?.name?.lastName].filter(Boolean).join(' ') || undefined,\n rawData: jsonGuard.parse(data),\n };\n } catch {\n throw new ConnectorError(ConnectorErrorCodes.SocialIdTokenInvalid);\n }\n };\n\nconst authorizationCallbackHandler = async (parameterObject: unknown) => {\n const result = dataGuard.safeParse(parameterObject);\n\n if (!result.success) {\n throw new ConnectorError(ConnectorErrorCodes.General, JSON.stringify(parameterObject));\n }\n\n return result.data;\n};\n\nconst createAppleConnector: CreateConnector<SocialConnector> = async ({ getConfig }) => {\n return {\n metadata: defaultMetadata,\n type: ConnectorType.Social,\n configGuard: appleConfigGuard,\n getAuthorizationUri: getAuthorizationUri(getConfig),\n getUserInfo: getUserInfo(getConfig),\n };\n};\n\nexport default createAppleConnector;\n","import type { ConnectorMetadata } from '@logto/connector-kit';\nimport { ConnectorPlatform, ConnectorConfigFormItemType } from '@logto/connector-kit';\n\n// https://appleid.apple.com/.well-known/openid-configuration\nexport const issuer = 'https://appleid.apple.com';\nexport const authorizationEndpoint = `${issuer}/auth/authorize`;\nexport const accessTokenEndpoint = `${issuer}/auth/token`;\nexport const jwksUri = `${issuer}/auth/keys`;\n\nexport const defaultMetadata: ConnectorMetadata = {\n id: 'apple-universal',\n target: 'apple',\n platform: ConnectorPlatform.Universal,\n name: {\n en: 'Apple',\n 'zh-CN': 'Apple',\n 'tr-TR': 'Apple',\n ko: 'Apple',\n },\n logo: './logo.svg',\n logoDark: './logo-dark.svg',\n description: {\n en: 'Apple is a multinational high-end provider of hardware and software.',\n 'zh-CN': 'Apple 是全球领先的高端消费者软硬件提供商。',\n 'tr-TR': 'Apple, çok uluslu bir üst düzey donanım ve yazılım sağlayıcısıdır.',\n ko: 'Apple은 하드웨어와 소프트웨어의 다국적 공급자 입니다.',\n },\n readme: './README.md',\n formItems: [\n {\n key: 'clientId',\n type: ConnectorConfigFormItemType.Text,\n required: true,\n label: 'Identifier',\n placeholder: '<your-registered-identifier>',\n },\n {\n key: 'scope',\n type: ConnectorConfigFormItemType.Text,\n required: false,\n label: 'Scope',\n placeholder: 'email name',\n },\n ],\n};\n\nexport const defaultTimeout = 5000;\n","import { z } from 'zod';\n\nexport const appleConfigGuard = z.object({\n clientId: z.string(),\n scope: z.string().optional(),\n});\n\nexport type AppleConfig = z.infer<typeof appleConfigGuard>;\n\nconst stringToJson = () =>\n z.string().transform((value, ctx): z.ZodType<JSON> => {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.parse(value);\n } catch {\n ctx.addIssue({ code: 'custom', message: 'Invalid JSON' });\n return z.NEVER;\n }\n });\n\n// https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/configuring_your_webpage_for_sign_in_with_apple#3331292\n// https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332113\nexport const dataGuard = z.object({\n id_token: z.string(),\n user: stringToJson()\n .pipe(\n z\n .object({\n name: z\n .object({\n firstName: z.string(),\n lastName: z.string(),\n })\n .partial(),\n email: z.string(),\n })\n .partial()\n )\n .optional(),\n});\n"],"mappings":";AAAA,SAAS,cAAc;AASvB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,0BAA0B;AACnC,SAAS,oBAAoB,iBAAiB;;;AChB9C,SAAS,mBAAmB,mCAAmC;AAGxD,IAAM,SAAS;AACf,IAAM,wBAAwB,GAAG,MAAM;AACvC,IAAM,sBAAsB,GAAG,MAAM;AACrC,IAAM,UAAU,GAAG,MAAM;AAEzB,IAAM,kBAAqC;AAAA,EAChD,IAAI;AAAA,EACJ,QAAQ;AAAA,EACR,UAAU,kBAAkB;AAAA,EAC5B,MAAM;AAAA,IACJ,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,IAAI;AAAA,EACN;AAAA,EACA,MAAM;AAAA,EACN,UAAU;AAAA,EACV,aAAa;AAAA,IACX,IAAI;AAAA,IACJ,SAAS;AAAA,IACT,SAAS;AAAA,IACT,IAAI;AAAA,EACN;AAAA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,oBAAoB;AAAA,IACnE;AAEA,WAAO;AAAA,MACL,IAAI,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMZ,OACE,MAAM,UACL,QAAQ,SAAS,QAAQ,mBAAmB,OAAO,OAAO,QAAQ,KAAK,IAAI;AAAA,MAC9E,MAAM,CAAC,MAAM,MAAM,WAAW,MAAM,MAAM,QAAQ,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,KAAK;AAAA,MACjF,SAAS,UAAU,MAAM,IAAI;AAAA,IAC/B;AAAA,EACF,QAAQ;AACN,UAAM,IAAI,eAAe,oBAAoB,oBAAoB;AAAA,EACnE;AACF;AAEF,IAAM,+BAA+B,OAAO,oBAA6B;AACvE,QAAM,SAAS,UAAU,UAAU,eAAe;AAElD,MAAI,CAAC,OAAO,SAAS;AACnB,UAAM,IAAI,eAAe,oBAAoB,SAAS,KAAK,UAAU,eAAe,CAAC;AAAA,EACvF;AAEA,SAAO,OAAO;AAChB;AAEA,IAAM,uBAAyD,OAAO,EAAE,UAAU,MAAM;AACtF,SAAO;AAAA,IACL,UAAU;AAAA,IACV,MAAM,cAAc;AAAA,IACpB,aAAa;AAAA,IACb,qBAAqB,oBAAoB,SAAS;AAAA,IAClD,aAAa,YAAY,SAAS;AAAA,EACpC;AACF;AAEA,IAAO,gBAAQ;","names":[]}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@logto/connector-apple",
3
- "version": "1.4.0",
3
+ "version": "1.4.1",
4
4
  "description": "Apple web connector implementation.",
5
5
  "dependencies": {
6
- "@logto/connector-kit": "^4.0.0",
7
- "@logto/shared": "^3.1.0",
6
+ "@logto/connector-kit": "^4.1.1",
7
+ "@logto/shared": "^3.1.4",
8
8
  "@silverhand/essentials": "^2.9.1",
9
9
  "got": "^14.0.0",
10
10
  "jose": "^5.6.3",
@@ -46,15 +46,15 @@
46
46
  "@silverhand/ts-config": "6.0.0",
47
47
  "@types/node": "^20.11.20",
48
48
  "@types/supertest": "^6.0.2",
49
- "@vitest/coverage-v8": "^2.0.0",
49
+ "@vitest/coverage-v8": "^2.1.9",
50
50
  "eslint": "^8.56.0",
51
51
  "lint-staged": "^15.0.2",
52
52
  "nock": "^13.3.1",
53
53
  "prettier": "^3.0.0",
54
54
  "supertest": "^7.0.0",
55
- "tsup": "^8.1.0",
55
+ "tsup": "^8.3.0",
56
56
  "typescript": "^5.5.3",
57
- "vitest": "^2.0.0"
57
+ "vitest": "^2.1.9"
58
58
  },
59
59
  "scripts": {
60
60
  "precommit": "lint-staged",