@hexclave/next 1.0.21 → 1.0.23

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 (80) hide show
  1. package/README.md +187 -7
  2. package/dist/components/elements/sidebar-layout.js +1 -1
  3. package/dist/components-page/oauth-callback.js +14 -19
  4. package/dist/components-page/oauth-callback.js.map +1 -1
  5. package/dist/components-page/oauth-callback.test.d.ts +1 -0
  6. package/dist/components-page/oauth-callback.test.js +90 -0
  7. package/dist/components-page/oauth-callback.test.js.map +1 -0
  8. package/dist/dev-tool/index.d.ts +6 -5
  9. package/dist/dev-tool/index.d.ts.map +1 -1
  10. package/dist/dev-tool/index.js +16 -6
  11. package/dist/dev-tool/index.js.map +1 -1
  12. package/dist/esm/components/elements/sidebar-layout.js +1 -1
  13. package/dist/esm/components-page/oauth-callback.js +14 -19
  14. package/dist/esm/components-page/oauth-callback.js.map +1 -1
  15. package/dist/esm/components-page/oauth-callback.test.d.ts +1 -0
  16. package/dist/esm/components-page/oauth-callback.test.js +89 -0
  17. package/dist/esm/components-page/oauth-callback.test.js.map +1 -0
  18. package/dist/esm/dev-tool/index.d.ts +6 -5
  19. package/dist/esm/dev-tool/index.d.ts.map +1 -1
  20. package/dist/esm/dev-tool/index.js +16 -6
  21. package/dist/esm/dev-tool/index.js.map +1 -1
  22. package/dist/esm/generated/quetzal-translations.d.ts +2 -2
  23. package/dist/esm/lib/auth.d.ts.map +1 -1
  24. package/dist/esm/lib/auth.js +32 -11
  25. package/dist/esm/lib/auth.js.map +1 -1
  26. package/dist/esm/lib/auth.test.js +25 -10
  27. package/dist/esm/lib/auth.test.js.map +1 -1
  28. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +3 -2
  29. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  30. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js +1 -0
  31. package/dist/esm/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  32. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +54 -0
  33. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
  34. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +5 -2
  35. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  36. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js +29 -5
  37. package/dist/esm/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  38. package/dist/esm/lib/hexclave-app/apps/implementations/common.js +1 -1
  39. package/dist/esm/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
  40. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts +1 -0
  41. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  42. package/dist/esm/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  43. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts +5 -3
  44. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  45. package/dist/esm/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  46. package/dist/generated/quetzal-translations.d.ts +2 -2
  47. package/dist/lib/auth.d.ts.map +1 -1
  48. package/dist/lib/auth.js +31 -10
  49. package/dist/lib/auth.js.map +1 -1
  50. package/dist/lib/auth.test.js +23 -8
  51. package/dist/lib/auth.test.js.map +1 -1
  52. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts +3 -2
  53. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.d.ts.map +1 -1
  54. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js +1 -0
  55. package/dist/lib/hexclave-app/apps/implementations/admin-app-impl.js.map +1 -1
  56. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js +54 -0
  57. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.js.map +1 -1
  58. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts +5 -2
  59. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.d.ts.map +1 -1
  60. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js +28 -4
  61. package/dist/lib/hexclave-app/apps/implementations/client-app-impl.js.map +1 -1
  62. package/dist/lib/hexclave-app/apps/implementations/common.js +1 -1
  63. package/dist/lib/hexclave-app/apps/implementations/server-app-impl.d.ts +1 -1
  64. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts +1 -0
  65. package/dist/lib/hexclave-app/apps/interfaces/admin-app.d.ts.map +1 -1
  66. package/dist/lib/hexclave-app/apps/interfaces/admin-app.js.map +1 -1
  67. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts +5 -3
  68. package/dist/lib/hexclave-app/apps/interfaces/client-app.d.ts.map +1 -1
  69. package/dist/lib/hexclave-app/apps/interfaces/client-app.js.map +1 -1
  70. package/package.json +4 -4
  71. package/src/components-page/oauth-callback.test.tsx +109 -0
  72. package/src/components-page/oauth-callback.tsx +14 -19
  73. package/src/dev-tool/index.ts +27 -6
  74. package/src/lib/auth.test.ts +32 -10
  75. package/src/lib/auth.ts +41 -7
  76. package/src/lib/hexclave-app/apps/implementations/admin-app-impl.ts +2 -1
  77. package/src/lib/hexclave-app/apps/implementations/client-app-impl.cross-domain.test.ts +66 -0
  78. package/src/lib/hexclave-app/apps/implementations/client-app-impl.ts +40 -4
  79. package/src/lib/hexclave-app/apps/interfaces/admin-app.ts +1 -0
  80. package/src/lib/hexclave-app/apps/interfaces/client-app.ts +5 -3
@@ -1 +1 @@
1
- {"version":3,"file":"auth.d.ts","names":[],"sources":["../../../src/lib/auth.ts"],"mappings":";;;;iBAWsB,6BAAA,CACpB,KAAA,EAAO,uBAAA,EACP,OAAA;EACE,QAAA;EACA,WAAA;EACA,gBAAA;EACA,aAAA;AAAA,GAEF,OAAA,EAAS,eAAA,GACR,OAAA;AAAA,iBA0HmB,iBAAA,CACpB,KAAA,EAAO,uBAAA,EACP,WAAA,UACA,OAAA;EACE,+BAAA;AAAA,IACD,OAAA"}
1
+ {"version":3,"file":"auth.d.ts","names":[],"sources":["../../../src/lib/auth.ts"],"mappings":";;;;iBAWsB,6BAAA,CACpB,KAAA,EAAO,uBAAA,EACP,OAAA;EACE,QAAA;EACA,WAAA;EACA,gBAAA;EACA,aAAA;AAAA,GAEF,OAAA,EAAS,eAAA,GACR,OAAA;AAAA,iBA4JmB,iBAAA,CACpB,KAAA,EAAO,uBAAA,EACP,WAAA,UACA,OAAA;EACE,+BAAA;AAAA,IACD,OAAA"}
@@ -1,6 +1,6 @@
1
1
  import { deindent } from "@hexclave/shared/dist/utils/strings";
2
2
  import { HexclaveAssertionError, throwErr } from "@hexclave/shared/dist/utils/errors";
3
- import { KnownError } from "@hexclave/shared";
3
+ import { KnownError, KnownErrors } from "@hexclave/shared";
4
4
  import { Result } from "@hexclave/shared/dist/utils/results";
5
5
  import { constructRedirectUrl } from "../utils/url.js";
6
6
  import { consumeVerifierAndStateCookie, saveVerifierAndState } from "./cookie.js";
@@ -20,14 +20,29 @@ async function getNewOAuthProviderOrScopeUrl(iface, options, session) {
20
20
  providerScope: options.providerScope
21
21
  });
22
22
  }
23
+ const oauthErrorParams = [
24
+ "error",
25
+ "error_description",
26
+ "errorCode",
27
+ "message",
28
+ "details"
29
+ ];
30
+ function removeOAuthErrorParamsFromHistory(originalUrl) {
31
+ const newUrl = new URL(originalUrl);
32
+ for (const param of oauthErrorParams) newUrl.searchParams.delete(param);
33
+ window.history.replaceState({}, "", newUrl.toString());
34
+ }
35
+ function getProviderOAuthErrorFromUrl(originalUrl) {
36
+ const providerError = originalUrl.searchParams.get("error");
37
+ const providerErrorDescription = originalUrl.searchParams.get("error_description");
38
+ if (providerError == null && providerErrorDescription == null) return null;
39
+ switch (providerError) {
40
+ case "access_denied":
41
+ case "consent_required": return new KnownErrors.OAuthProviderAccessDenied();
42
+ default: return new KnownErrors.OAuthProviderTemporarilyUnavailable();
43
+ }
44
+ }
23
45
  function consumeOAuthCallbackQueryParams(options) {
24
- const oauthErrorParams = [
25
- "error",
26
- "error_description",
27
- "errorCode",
28
- "message",
29
- "details"
30
- ];
31
46
  const requiredParams = ["code", "state"];
32
47
  const originalUrl = new URL(window.location.href);
33
48
  const knownErrorCode = originalUrl.searchParams.get("errorCode");
@@ -43,9 +58,7 @@ function consumeOAuthCallbackQueryParams(options) {
43
58
  cause: error
44
59
  });
45
60
  }
46
- const newUrl = new URL(originalUrl);
47
- for (const param of oauthErrorParams) newUrl.searchParams.delete(param);
48
- window.history.replaceState({}, "", newUrl.toString());
61
+ removeOAuthErrorParamsFromHistory(originalUrl);
49
62
  return {
50
63
  type: "known-error",
51
64
  error: KnownError.fromJson({
@@ -55,6 +68,14 @@ function consumeOAuthCallbackQueryParams(options) {
55
68
  })
56
69
  };
57
70
  }
71
+ const providerOAuthError = getProviderOAuthErrorFromUrl(originalUrl);
72
+ if (providerOAuthError != null && !requiredParams.every((param) => originalUrl.searchParams.has(param))) {
73
+ removeOAuthErrorParamsFromHistory(originalUrl);
74
+ return {
75
+ type: "known-error",
76
+ error: providerOAuthError
77
+ };
78
+ }
58
79
  for (const param of requiredParams) if (!originalUrl.searchParams.has(param)) {
59
80
  if (!options?.dontWarnAboutMissingQueryParams) console.warn(/* @__PURE__ */ new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));
60
81
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","names":[],"sources":["../../../src/lib/auth.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownError, HexclaveClientInterface } from \"@hexclave/shared\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport { HexclaveAssertionError, throwErr } from \"@hexclave/shared/dist/utils/errors\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { deindent } from \"@hexclave/shared/dist/utils/strings\";\nimport { constructRedirectUrl } from \"../utils/url\";\nimport { consumeVerifierAndStateCookie, saveVerifierAndState } from \"./cookie\";\nexport async function getNewOAuthProviderOrScopeUrl(\n iface: HexclaveClientInterface,\n options: {\n provider: string,\n redirectUrl: string,\n errorRedirectUrl: string,\n providerScope?: string,\n },\n session: InternalSession,\n): Promise<string> {\n const { codeChallenge, state } = await saveVerifierAndState();\n return await iface.getOAuthUrl({\n provider: options.provider,\n redirectUrl: constructRedirectUrl(options.redirectUrl, \"redirectUrl\"),\n errorRedirectUrl: constructRedirectUrl(options.errorRedirectUrl, \"errorRedirectUrl\"),\n afterCallbackRedirectUrl: constructRedirectUrl(window.location.href, \"afterCallbackRedirectUrl\"),\n codeChallenge,\n state,\n type: \"link\",\n session,\n providerScope: options.providerScope,\n });\n}\n\n/**\n * Checks if the current URL has the query parameters for an OAuth callback, and if so, removes them.\n *\n * Must be synchronous for the logic in callOAuthCallback to work without race conditions.\n */\ntype OAuthCallbackConsumptionResult =\n | {\n type: \"oauth-response\",\n originalUrl: URL,\n codeVerifier: string,\n state: string,\n }\n | {\n type: \"known-error\",\n error: KnownError,\n };\n\nfunction consumeOAuthCallbackQueryParams(options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n}): OAuthCallbackConsumptionResult | null {\n const oauthErrorParams = [\"error\", \"error_description\", \"errorCode\", \"message\", \"details\"] as const;\n const requiredParams = [\"code\", \"state\"];\n const originalUrl = new URL(window.location.href);\n const knownErrorCode = originalUrl.searchParams.get(\"errorCode\");\n const knownErrorMessage = originalUrl.searchParams.get(\"message\");\n if (knownErrorCode && knownErrorMessage) {\n const details = originalUrl.searchParams.get(\"details\");\n let detailsJson = {};\n if (details) {\n try {\n detailsJson = JSON.parse(details);\n } catch (error) {\n throw new HexclaveAssertionError(\"OAuth callback returned malformed known-error details\", {\n details,\n cause: error,\n });\n }\n }\n\n const newUrl = new URL(originalUrl);\n for (const param of oauthErrorParams) {\n newUrl.searchParams.delete(param);\n }\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"known-error\",\n error: KnownError.fromJson({\n code: knownErrorCode,\n message: knownErrorMessage,\n details: detailsJson,\n }),\n };\n }\n\n for (const param of requiredParams) {\n if (!originalUrl.searchParams.has(param)) {\n if (!options?.dontWarnAboutMissingQueryParams) {\n console.warn(new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));\n }\n return null;\n }\n }\n\n const expectedState = originalUrl.searchParams.get(\"state\") ?? throwErr(\"This should never happen; isn't state required above?\");\n const cookieResult = consumeVerifierAndStateCookie(expectedState);\n\n if (!cookieResult) {\n // If the state can't be found in the cookies, then the callback wasn't meant for us.\n // Maybe the website uses another OAuth library?\n console.warn(deindent`\n Stack found an outer OAuth callback state in the query parameters, but not in cookies.\n\n This could have multiple reasons:\n - The cookie expired, because the OAuth flow took too long.\n - The user's browser deleted the cookie, either manually or because of a very strict cookie policy.\n - The cookie was already consumed by this page, and the user already logged in.\n - You are using another OAuth client library with the same callback URL as Stack.\n - The user opened the OAuth callback page from their history.\n\n Either way, it is probably safe to ignore this warning unless you are debugging an OAuth issue.\n `);\n return null;\n }\n\n\n const newUrl = new URL(originalUrl);\n for (const param of requiredParams) {\n newUrl.searchParams.delete(param);\n }\n\n // let's get rid of the authorization code in the history as we\n // don't redirect to `redirectUrl` if there's a validation error\n // (as the redirectUrl might be malicious!).\n //\n // We use history.replaceState instead of location.assign(...) to\n // prevent an unnecessary reload\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"oauth-response\",\n originalUrl,\n codeVerifier: cookieResult.codeVerifier,\n state: expectedState,\n };\n}\n\nexport async function callOAuthCallback(\n iface: HexclaveClientInterface,\n redirectUrl: string,\n options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n },\n) {\n // note: this part of the function (until the return) needs\n // to be synchronous, to prevent race conditions when\n // callOAuthCallback is called multiple times in parallel\n const consumed = consumeOAuthCallbackQueryParams(options);\n if (!consumed) return Result.ok(undefined);\n if (consumed.type === \"known-error\") {\n throw consumed.error;\n }\n\n // the rest can be asynchronous (we now know that we are the\n // intended recipient of the callback, and the only instance\n // of callOAuthCallback that's running)\n try {\n return Result.ok(await iface.callOAuthCallback({\n oauthParams: consumed.originalUrl.searchParams,\n redirectUri: constructRedirectUrl(redirectUrl, \"redirectUri\"),\n codeVerifier: consumed.codeVerifier,\n state: consumed.state,\n }));\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n throw e;\n }\n throw new HexclaveAssertionError(\"Error signing in during OAuth callback. Please try again.\", { cause: e });\n }\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,8BACpB,OACA,SAMA,SACiB;CACjB,MAAM,EAAE,eAAe,UAAU,MAAM,sBAAsB;AAC7D,QAAO,MAAM,MAAM,YAAY;EAC7B,UAAU,QAAQ;EAClB,aAAa,qBAAqB,QAAQ,aAAa,cAAc;EACrE,kBAAkB,qBAAqB,QAAQ,kBAAkB,mBAAmB;EACpF,0BAA0B,qBAAqB,OAAO,SAAS,MAAM,2BAA2B;EAChG;EACA;EACA,MAAM;EACN;EACA,eAAe,QAAQ;EACxB,CAAC;;AAoBJ,SAAS,gCAAgC,SAEC;CACxC,MAAM,mBAAmB;EAAC;EAAS;EAAqB;EAAa;EAAW;EAAU;CAC1F,MAAM,iBAAiB,CAAC,QAAQ,QAAQ;CACxC,MAAM,cAAc,IAAI,IAAI,OAAO,SAAS,KAAK;CACjD,MAAM,iBAAiB,YAAY,aAAa,IAAI,YAAY;CAChE,MAAM,oBAAoB,YAAY,aAAa,IAAI,UAAU;AACjE,KAAI,kBAAkB,mBAAmB;EACvC,MAAM,UAAU,YAAY,aAAa,IAAI,UAAU;EACvD,IAAI,cAAc,EAAE;AACpB,MAAI,QACF,KAAI;AACF,iBAAc,KAAK,MAAM,QAAQ;WAC1B,OA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ACV,MAAI,WAAW,aAAa,EAAE,CAC5B,OAAM;AAER,QAAM,IAAI,uBAAuB,6DAA6D,EAAE,OAAO,GAAG,CAAC"}
1
+ {"version":3,"file":"auth.js","names":[],"sources":["../../../src/lib/auth.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\nimport { KnownError, KnownErrors, HexclaveClientInterface } from \"@hexclave/shared\";\nimport { InternalSession } from \"@hexclave/shared/dist/sessions\";\nimport { HexclaveAssertionError, throwErr } from \"@hexclave/shared/dist/utils/errors\";\nimport { Result } from \"@hexclave/shared/dist/utils/results\";\nimport { deindent } from \"@hexclave/shared/dist/utils/strings\";\nimport { constructRedirectUrl } from \"../utils/url\";\nimport { consumeVerifierAndStateCookie, saveVerifierAndState } from \"./cookie\";\nexport async function getNewOAuthProviderOrScopeUrl(\n iface: HexclaveClientInterface,\n options: {\n provider: string,\n redirectUrl: string,\n errorRedirectUrl: string,\n providerScope?: string,\n },\n session: InternalSession,\n): Promise<string> {\n const { codeChallenge, state } = await saveVerifierAndState();\n return await iface.getOAuthUrl({\n provider: options.provider,\n redirectUrl: constructRedirectUrl(options.redirectUrl, \"redirectUrl\"),\n errorRedirectUrl: constructRedirectUrl(options.errorRedirectUrl, \"errorRedirectUrl\"),\n afterCallbackRedirectUrl: constructRedirectUrl(window.location.href, \"afterCallbackRedirectUrl\"),\n codeChallenge,\n state,\n type: \"link\",\n session,\n providerScope: options.providerScope,\n });\n}\n\n/**\n * Checks if the current URL has the query parameters for an OAuth callback, and if so, removes them.\n *\n * Must be synchronous for the logic in callOAuthCallback to work without race conditions.\n */\ntype OAuthCallbackConsumptionResult =\n | {\n type: \"oauth-response\",\n originalUrl: URL,\n codeVerifier: string,\n state: string,\n }\n | {\n type: \"known-error\",\n error: KnownError,\n };\n\nconst oauthErrorParams = [\"error\", \"error_description\", \"errorCode\", \"message\", \"details\"] as const;\n\nfunction removeOAuthErrorParamsFromHistory(originalUrl: URL): void {\n const newUrl = new URL(originalUrl);\n for (const param of oauthErrorParams) {\n newUrl.searchParams.delete(param);\n }\n window.history.replaceState({}, \"\", newUrl.toString());\n}\n\nfunction getProviderOAuthErrorFromUrl(originalUrl: URL): KnownError | null {\n const providerError = originalUrl.searchParams.get(\"error\");\n const providerErrorDescription = originalUrl.searchParams.get(\"error_description\");\n if (providerError == null && providerErrorDescription == null) {\n return null;\n }\n\n switch (providerError) {\n case \"access_denied\":\n case \"consent_required\": {\n return new KnownErrors.OAuthProviderAccessDenied();\n }\n case \"server_error\":\n case \"temporarily_unavailable\":\n default: {\n return new KnownErrors.OAuthProviderTemporarilyUnavailable();\n }\n }\n}\n\nfunction consumeOAuthCallbackQueryParams(options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n}): OAuthCallbackConsumptionResult | null {\n const requiredParams = [\"code\", \"state\"];\n const originalUrl = new URL(window.location.href);\n const knownErrorCode = originalUrl.searchParams.get(\"errorCode\");\n const knownErrorMessage = originalUrl.searchParams.get(\"message\");\n if (knownErrorCode && knownErrorMessage) {\n const details = originalUrl.searchParams.get(\"details\");\n let detailsJson = {};\n if (details) {\n try {\n detailsJson = JSON.parse(details);\n } catch (error) {\n throw new HexclaveAssertionError(\"OAuth callback returned malformed known-error details\", {\n details,\n cause: error,\n });\n }\n }\n\n removeOAuthErrorParamsFromHistory(originalUrl);\n\n return {\n type: \"known-error\",\n error: KnownError.fromJson({\n code: knownErrorCode,\n message: knownErrorMessage,\n details: detailsJson,\n }),\n };\n }\n\n const providerOAuthError = getProviderOAuthErrorFromUrl(originalUrl);\n if (providerOAuthError != null && !requiredParams.every(param => originalUrl.searchParams.has(param))) {\n removeOAuthErrorParamsFromHistory(originalUrl);\n return {\n type: \"known-error\",\n error: providerOAuthError,\n };\n }\n\n for (const param of requiredParams) {\n if (!originalUrl.searchParams.has(param)) {\n if (!options?.dontWarnAboutMissingQueryParams) {\n console.warn(new Error(`Missing required query parameter on OAuth callback: ${param}. Maybe you opened or reloaded the oauth-callback page from your history?`));\n }\n return null;\n }\n }\n\n const expectedState = originalUrl.searchParams.get(\"state\") ?? throwErr(\"This should never happen; isn't state required above?\");\n const cookieResult = consumeVerifierAndStateCookie(expectedState);\n\n if (!cookieResult) {\n // If the state can't be found in the cookies, then the callback wasn't meant for us.\n // Maybe the website uses another OAuth library?\n console.warn(deindent`\n Stack found an outer OAuth callback state in the query parameters, but not in cookies.\n\n This could have multiple reasons:\n - The cookie expired, because the OAuth flow took too long.\n - The user's browser deleted the cookie, either manually or because of a very strict cookie policy.\n - The cookie was already consumed by this page, and the user already logged in.\n - You are using another OAuth client library with the same callback URL as Stack.\n - The user opened the OAuth callback page from their history.\n\n Either way, it is probably safe to ignore this warning unless you are debugging an OAuth issue.\n `);\n return null;\n }\n\n\n const newUrl = new URL(originalUrl);\n for (const param of requiredParams) {\n newUrl.searchParams.delete(param);\n }\n\n // let's get rid of the authorization code in the history as we\n // don't redirect to `redirectUrl` if there's a validation error\n // (as the redirectUrl might be malicious!).\n //\n // We use history.replaceState instead of location.assign(...) to\n // prevent an unnecessary reload\n window.history.replaceState({}, \"\", newUrl.toString());\n\n return {\n type: \"oauth-response\",\n originalUrl,\n codeVerifier: cookieResult.codeVerifier,\n state: expectedState,\n };\n}\n\nexport async function callOAuthCallback(\n iface: HexclaveClientInterface,\n redirectUrl: string,\n options?: {\n dontWarnAboutMissingQueryParams?: boolean,\n },\n) {\n // note: this part of the function (until the return) needs\n // to be synchronous, to prevent race conditions when\n // callOAuthCallback is called multiple times in parallel\n const consumed = consumeOAuthCallbackQueryParams(options);\n if (!consumed) return Result.ok(undefined);\n if (consumed.type === \"known-error\") {\n throw consumed.error;\n }\n\n // the rest can be asynchronous (we now know that we are the\n // intended recipient of the callback, and the only instance\n // of callOAuthCallback that's running)\n try {\n return Result.ok(await iface.callOAuthCallback({\n oauthParams: consumed.originalUrl.searchParams,\n redirectUri: constructRedirectUrl(redirectUrl, \"redirectUri\"),\n codeVerifier: consumed.codeVerifier,\n state: consumed.state,\n }));\n } catch (e) {\n if (KnownError.isKnownError(e)) {\n throw e;\n }\n throw new HexclaveAssertionError(\"Error signing in during OAuth callback. Please try again.\", { cause: e });\n }\n}\n"],"mappings":";;;;;;;;AAWA,eAAsB,8BACpB,OACA,SAMA,SACiB;CACjB,MAAM,EAAE,eAAe,UAAU,MAAM,sBAAsB;AAC7D,QAAO,MAAM,MAAM,YAAY;EAC7B,UAAU,QAAQ;EAClB,aAAa,qBAAqB,QAAQ,aAAa,cAAc;EACrE,kBAAkB,qBAAqB,QAAQ,kBAAkB,mBAAmB;EACpF,0BAA0B,qBAAqB,OAAO,SAAS,MAAM,2BAA2B;EAChG;EACA;EACA,MAAM;EACN;EACA,eAAe,QAAQ;EACxB,CAAC;;AAoBJ,MAAM,mBAAmB;CAAC;CAAS;CAAqB;CAAa;CAAW;CAAU;AAE1F,SAAS,kCAAkC,aAAwB;CACjE,MAAM,SAAS,IAAI,IAAI,YAAY;AACnC,MAAK,MAAM,SAAS,iBAClB,QAAO,aAAa,OAAO,MAAM;AAEnC,QAAO,QAAQ,aAAa,EAAE,EAAE,IAAI,OAAO,UAAU,CAAC;;AAGxD,SAAS,6BAA6B,aAAqC;CACzE,MAAM,gBAAgB,YAAY,aAAa,IAAI,QAAQ;CAC3D,MAAM,2BAA2B,YAAY,aAAa,IAAI,oBAAoB;AAClF,KAAI,iBAAiB,QAAQ,4BAA4B,KACvD,QAAO;AAGT,SAAQ,eAAR;EACE,KAAK;EACL,KAAK,mBACH,QAAO,IAAI,YAAY,2BAA2B;EAIpD,QACE,QAAO,IAAI,YAAY,qCAAqC;;;AAKlE,SAAS,gCAAgC,SAEC;CACxC,MAAM,iBAAiB,CAAC,QAAQ,QAAQ;CACxC,MAAM,cAAc,IAAI,IAAI,OAAO,SAAS,KAAK;CACjD,MAAM,iBAAiB,YAAY,aAAa,IAAI,YAAY;CAChE,MAAM,oBAAoB,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G,OAAU;AAC1C,KAAI,SAAS,SAAS,cACpB,OAAM,SAAS;AAMjB,KAAI;AACF,SAAO,OAAO,GAAG,MAAM,MAAM,kBAAkB;GAC7C,aAAa,SAAS,YAAY;GAClC,aAAa,qBAAqB,aAAa,cAAc;GAC7D,cAAc,SAAS;GACvB,OAAO,SAAS;GACjB,CAAC,CAAC;UACI,GAAG;AACV,MAAI,WAAW,aAAa,EAAE,CAC5B,OAAM;AAER,QAAM,IAAI,uBAAuB,6DAA6D,EAAE,OAAO,GAAG,CAAC"}
@@ -1,6 +1,6 @@
1
- import { HexclaveClientInterface } from "@hexclave/shared";
1
+ import { HexclaveClientInterface, KnownErrors } from "@hexclave/shared";
2
2
  import { describe, expect, it, vi } from "vitest";
3
- import { getNewOAuthProviderOrScopeUrl } from "./auth.js";
3
+ import { callOAuthCallback, getNewOAuthProviderOrScopeUrl } from "./auth.js";
4
4
 
5
5
  //#region src/lib/auth.test.ts
6
6
  // @vitest-environment jsdom
@@ -13,17 +13,20 @@ vi.mock("./cookie", async (importOriginal) => {
13
13
  })
14
14
  };
15
15
  });
16
+ function createTestInterface() {
17
+ return new HexclaveClientInterface({
18
+ clientVersion: "test",
19
+ getBaseUrl: () => "https://api.example.com",
20
+ getApiUrls: () => ["https://api.example.com"],
21
+ extraRequestHeaders: {},
22
+ projectId: "00000000-0000-4000-8000-000000000000",
23
+ publishableClientKey: "pck_test"
24
+ });
25
+ }
16
26
  describe("getNewOAuthProviderOrScopeUrl", () => {
17
27
  it("returns the OAuth URL without performing navigation", async () => {
18
28
  window.history.replaceState({}, "", "/account?after_auth_return_to=%2Fsettings");
19
- const iface = new HexclaveClientInterface({
20
- clientVersion: "test",
21
- getBaseUrl: () => "https://api.example.com",
22
- getApiUrls: () => ["https://api.example.com"],
23
- extraRequestHeaders: {},
24
- projectId: "00000000-0000-4000-8000-000000000000",
25
- publishableClientKey: "pck_test"
26
- });
29
+ const iface = createTestInterface();
27
30
  const location = await getNewOAuthProviderOrScopeUrl(iface, {
28
31
  provider: "github",
29
32
  redirectUrl: "/handler/oauth-callback",
@@ -54,6 +57,18 @@ describe("getNewOAuthProviderOrScopeUrl", () => {
54
57
  `);
55
58
  });
56
59
  });
60
+ describe("callOAuthCallback", () => {
61
+ it("turns provider access denial callback params into a known error", async () => {
62
+ window.history.replaceState({}, "", "/handler/oauth-callback?error=access_denied&error_description=User+cancelled");
63
+ await expect(callOAuthCallback(createTestInterface(), "/handler/oauth-callback")).rejects.toSatisfy((error) => KnownErrors.OAuthProviderAccessDenied.isInstance(error));
64
+ expect(window.location.href).toBe("http://localhost:3000/handler/oauth-callback");
65
+ });
66
+ it("turns generic provider error callback params into a known error", async () => {
67
+ window.history.replaceState({}, "", "/handler/oauth-callback?error=server_error&error_description=Provider+failed");
68
+ await expect(callOAuthCallback(createTestInterface(), "/handler/oauth-callback")).rejects.toSatisfy((error) => KnownErrors.OAuthProviderTemporarilyUnavailable.isInstance(error));
69
+ expect(window.location.href).toBe("http://localhost:3000/handler/oauth-callback");
70
+ });
71
+ });
57
72
 
58
73
  //#endregion
59
74
  export { };
@@ -1 +1 @@
1
- {"version":3,"file":"auth.test.js","names":[],"sources":["../../../src/lib/auth.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\n// @vitest-environment jsdom\n\nimport { HexclaveClientInterface } from \"@hexclave/shared\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { getNewOAuthProviderOrScopeUrl } from \"./auth\";\n\nvi.mock(\"./cookie\", async (importOriginal) => {\n const actual = await importOriginal<typeof import(\"./cookie\")>();\n return {\n ...actual,\n saveVerifierAndState: async () => ({\n codeChallenge: \"<stripped code challenge>\",\n state: \"<stripped state>\",\n }),\n };\n});\n\ndescribe(\"getNewOAuthProviderOrScopeUrl\", () => {\n it(\"returns the OAuth URL without performing navigation\", async () => {\n window.history.replaceState({}, \"\", \"/account?after_auth_return_to=%2Fsettings\");\n\n const iface = new HexclaveClientInterface({\n clientVersion: \"test\",\n getBaseUrl: () => \"https://api.example.com\",\n getApiUrls: () => [\"https://api.example.com\"],\n extraRequestHeaders: {},\n projectId: \"00000000-0000-4000-8000-000000000000\",\n publishableClientKey: \"pck_test\",\n });\n const session = iface.createSession({ refreshToken: null, accessToken: null });\n\n const location = await getNewOAuthProviderOrScopeUrl(\n iface,\n {\n provider: \"github\",\n redirectUrl: \"/handler/oauth-callback\",\n errorRedirectUrl: \"/handler/error\",\n providerScope: \"repo user\",\n },\n session,\n );\n\n const url = new URL(location);\n expect(`${url.origin}${url.pathname}`).toBe(\"https://api.example.com/api/v1/auth/oauth/authorize/github\");\n expect(Object.fromEntries(url.searchParams.entries())).toMatchInlineSnapshot(`\n {\n \"after_callback_redirect_url\": \"http://localhost:3000/account?after_auth_return_to=%2Fsettings\",\n \"client_id\": \"00000000-0000-4000-8000-000000000000\",\n \"client_secret\": \"pck_test\",\n \"code_challenge\": \"<stripped code challenge>\",\n \"code_challenge_method\": \"S256\",\n \"error_redirect_url\": \"http://localhost:3000/handler/error?after_auth_return_to=%2Fsettings\",\n \"grant_type\": \"authorization_code\",\n \"provider_scope\": \"repo user\",\n \"redirect_uri\": \"http://localhost:3000/handler/oauth-callback?after_auth_return_to=%2Fsettings\",\n \"response_type\": \"code\",\n \"scope\": \"legacy\",\n \"state\": \"<stripped state>\",\n \"type\": \"link\",\n }\n `);\n });\n});\n"],"mappings":";;;;;;AAUA,GAAG,KAAK,YAAY,OAAO,mBAAmB;AAE5C,QAAO;EACL,GAFa,MAAM,gBAA2C;EAG9D,sBAAsB,aAAa;GACjC,eAAe;GACf,OAAO;GACR;EACF;EACD;AAEF,SAAS,uCAAuC;AAC9C,IAAG,uDAAuD,YAAY;AACpE,SAAO,QAAQ,aAAa,EAAE,EAAE,IAAI,4CAA4C;EAEhF,MAAM,QAAQ,IAAI,wBAAwB;GACxC,eAAe;GACf,kBAAkB;GAClB,kBAAkB,CAAC,0BAA0B;GAC7C,qBAAqB,EAAE;GACvB,WAAW;GACX,sBAAsB;GACvB,CAAC;EAGF,MAAM,WAAW,MAAM,8BACrB,OACA;GACE,UAAU;GACV,aAAa;GACb,kBAAkB;GAClB,eAAe;GAChB,EATa,MAAM,cAAc;GAAE,cAAc;GAAM,aAAa;GAAM,CAAC,CAW7E;EAED,MAAM,MAAM,IAAI,IAAI,SAAS;AAC7B,SAAO,GAAG,IAAI,SAAS,IAAI,WAAW,CAAC,KAAK,6DAA6D;AACzG,SAAO,OAAO,YAAY,IAAI,aAAa,SAAS,CAAC,CAAC,CAAC,sBAAsB;;;;;;;;;;;;;;;;MAgB3E;GACF;EACF"}
1
+ {"version":3,"file":"auth.test.js","names":[],"sources":["../../../src/lib/auth.test.ts"],"sourcesContent":["\n//===========================================\n// THIS FILE IS AUTO-GENERATED FROM TEMPLATE. DO NOT EDIT IT DIRECTLY UNLESS YOU ALSO EDIT THE CORRESPONDING FILE IN packages/template\n//===========================================\n// @vitest-environment jsdom\n\nimport { HexclaveClientInterface, KnownErrors } from \"@hexclave/shared\";\nimport { describe, expect, it, vi } from \"vitest\";\nimport { callOAuthCallback, getNewOAuthProviderOrScopeUrl } from \"./auth\";\n\nvi.mock(\"./cookie\", async (importOriginal) => {\n const actual = await importOriginal<typeof import(\"./cookie\")>();\n return {\n ...actual,\n saveVerifierAndState: async () => ({\n codeChallenge: \"<stripped code challenge>\",\n state: \"<stripped state>\",\n }),\n };\n});\n\nfunction createTestInterface() {\n return new HexclaveClientInterface({\n clientVersion: \"test\",\n getBaseUrl: () => \"https://api.example.com\",\n getApiUrls: () => [\"https://api.example.com\"],\n extraRequestHeaders: {},\n projectId: \"00000000-0000-4000-8000-000000000000\",\n publishableClientKey: \"pck_test\",\n });\n}\n\ndescribe(\"getNewOAuthProviderOrScopeUrl\", () => {\n it(\"returns the OAuth URL without performing navigation\", async () => {\n window.history.replaceState({}, \"\", \"/account?after_auth_return_to=%2Fsettings\");\n\n const iface = createTestInterface();\n const session = iface.createSession({ refreshToken: null, accessToken: null });\n\n const location = await getNewOAuthProviderOrScopeUrl(\n iface,\n {\n provider: \"github\",\n redirectUrl: \"/handler/oauth-callback\",\n errorRedirectUrl: \"/handler/error\",\n providerScope: \"repo user\",\n },\n session,\n );\n\n const url = new URL(location);\n expect(`${url.origin}${url.pathname}`).toBe(\"https://api.example.com/api/v1/auth/oauth/authorize/github\");\n expect(Object.fromEntries(url.searchParams.entries())).toMatchInlineSnapshot(`\n {\n \"after_callback_redirect_url\": \"http://localhost:3000/account?after_auth_return_to=%2Fsettings\",\n \"client_id\": \"00000000-0000-4000-8000-000000000000\",\n \"client_secret\": \"pck_test\",\n \"code_challenge\": \"<stripped code challenge>\",\n \"code_challenge_method\": \"S256\",\n \"error_redirect_url\": \"http://localhost:3000/handler/error?after_auth_return_to=%2Fsettings\",\n \"grant_type\": \"authorization_code\",\n \"provider_scope\": \"repo user\",\n \"redirect_uri\": \"http://localhost:3000/handler/oauth-callback?after_auth_return_to=%2Fsettings\",\n \"response_type\": \"code\",\n \"scope\": \"legacy\",\n \"state\": \"<stripped state>\",\n \"type\": \"link\",\n }\n `);\n });\n});\n\ndescribe(\"callOAuthCallback\", () => {\n it(\"turns provider access denial callback params into a known error\", async () => {\n window.history.replaceState({}, \"\", \"/handler/oauth-callback?error=access_denied&error_description=User+cancelled\");\n\n await expect(callOAuthCallback(createTestInterface(), \"/handler/oauth-callback\"))\n .rejects.toSatisfy((error: unknown) => KnownErrors.OAuthProviderAccessDenied.isInstance(error));\n expect(window.location.href).toBe(\"http://localhost:3000/handler/oauth-callback\");\n });\n\n it(\"turns generic provider error callback params into a known error\", async () => {\n window.history.replaceState({}, \"\", \"/handler/oauth-callback?error=server_error&error_description=Provider+failed\");\n\n await expect(callOAuthCallback(createTestInterface(), \"/handler/oauth-callback\"))\n .rejects.toSatisfy((error: unknown) => KnownErrors.OAuthProviderTemporarilyUnavailable.isInstance(error));\n expect(window.location.href).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BAA0B,CAAC,CAC9E,QAAQ,WAAW,UAAmB,YAAY,oCAAoC,WAAW,MAAM,CAAC;AAC3G,SAAO,OAAO,SAAS,KAAK,CAAC,KAAK,+CAA+C;GACjF;EACF"}
@@ -153,7 +153,7 @@ declare class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Pro
153
153
  tokenStore?: ______common0.TokenStoreInit<HasTokenStore> | undefined;
154
154
  redirectMethod?: ______common0.RedirectMethod;
155
155
  inheritsFrom?: __0.StackClientApp<any, any>;
156
- devTool?: boolean;
156
+ devTool?: boolean | "auto";
157
157
  noAutomaticPrefetch?: boolean;
158
158
  analytics?: __session_replay0.AnalyticsOptions;
159
159
  } & {
@@ -181,7 +181,7 @@ declare class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Pro
181
181
  tokenStore?: ______common0.TokenStoreInit<HasTokenStore> | undefined;
182
182
  redirectMethod?: ______common0.RedirectMethod;
183
183
  inheritsFrom?: __0.StackClientApp<any, any>;
184
- devTool?: boolean;
184
+ devTool?: boolean | "auto";
185
185
  noAutomaticPrefetch?: boolean;
186
186
  analytics?: __session_replay0.AnalyticsOptions;
187
187
  } & {
@@ -378,6 +378,7 @@ declare class _HexclaveAdminAppImplIncomplete<HasTokenStore extends boolean, Pro
378
378
  listOutboxEmails(options?: {
379
379
  status?: string;
380
380
  simpleStatus?: string;
381
+ userId?: string;
381
382
  limit?: number;
382
383
  cursor?: string;
383
384
  }): Promise<{
@@ -1 +1 @@
1
- {"version":3,"file":"admin-app-impl.d.ts","names":[],"sources":["../../../../../../src/lib/hexclave-app/apps/implementations/admin-app-impl.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cA2Ea,+BAAA,kEAAiG,gCAAA,CAAiC,aAAA,EAAe,SAAA,aAAsB,aAAA,CAAc,aAAA,EAAe,SAAA;EAAA,UAC7L,UAAA,EAAY,sBAAA;EAAA,iBAEb,kBAAA;EAAA,iBAGA,qBAAA;EAAA,iBAIA,qB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  status: options?.status,
912
912
  simple_status: options?.simpleStatus,
913
+ user_id: options?.userId,
913
914
  limit: options?.limit,
914
915
  cursor: options?.cursor
915
916
  });