@usesocial/cli 0.19.13 → 0.19.14

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @usesocial/cli
2
2
 
3
+ ## 0.19.14
4
+
5
+ ### Patch Changes
6
+
7
+ - [#178](https://github.com/usesocial/monorepo/pull/178) [`fb1647b`](https://github.com/usesocial/monorepo/commit/fb1647b6124bb3f3c918e4d915b3207d0edba7e4) Thanks [@CyrusNuevoDia](https://github.com/CyrusNuevoDia)! - Send the web origin with magic-link requests so account setup passes sign-in CSRF validation.
8
+
3
9
  ## 0.19.13
4
10
 
5
11
  ### Patch Changes
package/dist/index.mjs CHANGED
@@ -26523,7 +26523,7 @@ function createEnv(opts) {
26523
26523
  }
26524
26524
  //#endregion
26525
26525
  //#region package.json
26526
- var version$1 = "0.19.13";
26526
+ var version$1 = "0.19.14";
26527
26527
  //#endregion
26528
26528
  //#region src/lib/env.ts
26529
26529
  const URLWithTrailingSlash = url().transform(ensureTrailingSlash);
@@ -37600,13 +37600,15 @@ const deviceCallbackURLFor = (deviceCode, email) => {
37600
37600
  return `${parsed.pathname}${parsed.search}`;
37601
37601
  };
37602
37602
  const sendMagicLinkSignIn = async (email, callbackURL, deps = {}) => {
37603
- const response = await (deps.fetch ?? fetch)(magicLinkURLFor(deps.webBaseURL), {
37603
+ const magicLinkURL = magicLinkURLFor(deps.webBaseURL);
37604
+ const response = await (deps.fetch ?? fetch)(magicLinkURL, {
37604
37605
  body: JSON.stringify({
37605
37606
  callbackURL,
37606
37607
  email
37607
37608
  }),
37608
37609
  headers: {
37609
37610
  "content-type": "application/json",
37611
+ origin: new URL(magicLinkURL).origin,
37610
37612
  "x-social-surface": "cli"
37611
37613
  },
37612
37614
  method: "POST"