@movmo_app/types 1.25.0 → 1.27.0

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
@@ -27,15 +27,13 @@ Import the types you need in your TypeScript files:
27
27
  import {
28
28
  MovmoFlightOffer,
29
29
  FlightOfferDataSource,
30
- MovmoFrameMessageType,
31
- isTrustedOrigin,
30
+ MovmoExitReason,
32
31
  } from '@movmo_app/types';
33
32
 
34
33
  const dataSource: FlightOfferDataSource = FlightOfferDataSource.Amadeus;
35
34
  ```
36
35
 
37
- Field names are **snake_case** to match the Go backend's JSON — with one deliberate exception: the
38
- cross-frame `postMessage` payloads in `postmessage_contracts` are camelCase (browser convention).
36
+ Field names are **snake_case** to match the Go backend's JSON.
39
37
 
40
38
  ## Available Modules
41
39
 
@@ -53,11 +51,7 @@ Everything below is re-exported from the package root (see `src/index.ts`):
53
51
  - `referrals` — referral types
54
52
  - `identity` — identity-partner directory types (`IdentityPartner`, `mapIdentityPartners`)
55
53
  - `scope_copy` — shared OAuth scope display copy (one source of truth for consent-screen wording)
56
- - `postmessage_contracts` — the cross-frame `postMessage` contract shared by flights-ui and the
57
- `@movmo/express-checkout-button` / `@movmo/connect-button` embeds: `MovmoFrameMessageType`
58
- (READY/INIT handshake, booking outcomes, `RECOGNITION_STATE`/`RECOGNITION_TOKEN`/
59
- `RECOGNITION_RESIZE`/`RECOGNITION_CONNECT`/`RECOGNITION_ERROR`), the per-message payload
60
- interfaces, the origin allowlists, and `isTrustedOrigin`
54
+ - `express_checkout` — `MovmoExitReason`, the Express Checkout SDK `onExit` reason union
61
55
  - `types` — small shared helpers
62
56
 
63
57
  Conventions: `type` for DTOs, `interface` for extensible contracts, `enum` for fixed value sets
package/dist/auth.d.ts CHANGED
@@ -25,11 +25,6 @@ export type MovmoLoginRequest = {
25
25
  email: string;
26
26
  locale?: string;
27
27
  time_zone?: string;
28
- /**
29
- * Create the flow without sending a code for an unenrolled email; `/v1/auth/code` releases the
30
- * first send. Used by the partner iframe.
31
- */
32
- defer_code?: boolean;
33
28
  };
34
29
  export type MovmoLoginResponse = MovmoCodeFlow | MovmoPasskeyFlow;
35
30
  export type PasskeyOptionsResponse = {
@@ -46,7 +41,7 @@ export type MovmoVerifyResponse = {
46
41
  export type MovmoRecoveryCancelRequest = {
47
42
  token: string;
48
43
  };
49
- export type AuthErrorCode = 'invalid_email' | 'rate_limited' | 'resend_too_soon' | 'flow_expired' | 'invalid_code' | 'too_many_attempts' | 'invalid_request' | 'invalid_credential' | 'topOrigin_required' | 'passkey_limit' | 'credential_exists' | 'not_found' | 'reauth_required' | 'movmo_session_required' | 'first_party_only' | 'issuer_unavailable' | 'passkey_failed' | 'sign_in_failed' | 'recovery_required' | 'recovery_blocked' | 'recovery_cooldown' | 'code_sends_paused';
44
+ export type AuthErrorCode = 'invalid_email' | 'rate_limited' | 'resend_too_soon' | 'flow_expired' | 'invalid_code' | 'too_many_attempts' | 'invalid_request' | 'invalid_credential' | 'passkey_limit' | 'credential_exists' | 'not_found' | 'reauth_required' | 'movmo_session_required' | 'first_party_only' | 'issuer_unavailable' | 'passkey_failed' | 'sign_in_failed' | 'recovery_required' | 'recovery_blocked' | 'recovery_cooldown' | 'code_sends_paused';
50
45
  /**
51
46
  * ContactType represents the types of contact information that can be changed
52
47
  * through the contact-change flow (initiate, verify-identity, confirm).
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Why the checkout handed control back to the airline page (MOVMO-474). Part of the Express
3
+ * Checkout SDK return contract (`onExit`).
4
+ *
5
+ * 'booking_confirmed' (MOVMO-521) is the success-path exit: the traveler clicked
6
+ * "Return to {airline}" on the booking confirmation.
7
+ */
8
+ export type MovmoExitReason = 'search_again' | 'offer_unavailable' | 'booking_confirmed';
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export * from './sessions';
13
13
  export * from './booking_passenger';
14
14
  export * from './movmo_flight_offer';
15
15
  export * from './locale_preferences';
16
- export * from './postmessage_contracts';
16
+ export * from './express_checkout';
17
17
  export * from './identity';
18
18
  export * from './scope_copy';
19
19
  export * from './passkeys';
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ __exportStar(require("./sessions"), exports);
29
29
  __exportStar(require("./booking_passenger"), exports);
30
30
  __exportStar(require("./movmo_flight_offer"), exports);
31
31
  __exportStar(require("./locale_preferences"), exports);
32
- __exportStar(require("./postmessage_contracts"), exports);
32
+ __exportStar(require("./express_checkout"), exports);
33
33
  __exportStar(require("./identity"), exports);
34
34
  __exportStar(require("./scope_copy"), exports);
35
35
  __exportStar(require("./passkeys"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movmo_app/types",
3
- "version": "1.25.0",
3
+ "version": "1.27.0",
4
4
  "description": "A collection of Movmo's types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,199 +0,0 @@
1
- /**
2
- * postMessage contract shared by the Express Checkout iframe (flights-ui) and the
3
- * embedding parent page (`@movmo/express-checkout-button`).
4
- *
5
- * Both sides SHOULD coordinate exclusively via `window.postMessage` — no direct
6
- * cross-frame DOM access — validating every message against a strict origin allowlist in
7
- * both directions:
8
- *
9
- * - The PARENT should validate inbound messages against {@link MOVMO_FLIGHTS_ORIGINS}
10
- * ("is this really the Movmo checkout iframe I embedded?").
11
- * - The IFRAME should validate the inbound handshake against {@link MOVMO_PARTNER_ORIGINS}
12
- * ("is this parent page allowed to embed me and receive booking messages?").
13
- *
14
- * Handshake: on load the iframe posts {@link MovmoFrameMessageType.READY} (content-free)
15
- * to `"*"`; the parent replies with {@link MovmoFrameMessageType.INIT} carrying its own
16
- * origin, targeted at the iframe's origin. The iframe captures that origin so every
17
- * subsequent message goes to a specific origin instead of `"*"`.
18
- *
19
- * Adoption: both flights-ui (iframe) and `@movmo/express-checkout-button` (parent, as of
20
- * v1.4.0) consume this contract. Parent versions before v1.4.0 use their own hardcoded
21
- * origin list and perform no handshake.
22
- *
23
- * Note: payload field names are camelCase (browser `postMessage` data), a deliberate
24
- * departure from the snake_case Go-DTO convention used elsewhere in this package. Keep
25
- * them camelCase — the cross-repo consumers read these exact keys off the wire.
26
- */
27
- export declare enum MovmoFrameMessageType {
28
- /** iframe → parent: posted on load so the parent replies with INIT. Content-free. */
29
- READY = "MOVMO_READY",
30
- /** parent → iframe: handshake reply carrying the parent's origin so the iframe can
31
- * target subsequent messages instead of using `"*"`. */
32
- INIT = "MOVMO_INIT",
33
- /** iframe → parent: a booking finished successfully. */
34
- BOOKING_COMPLETE = "MOVMO_BOOKING_COMPLETE",
35
- /** iframe → parent: a booking failed in a non-retryable way. */
36
- BOOKING_FAILED = "MOVMO_BOOKING_FAILED",
37
- /**
38
- * iframe → parent: the recognition surface's current state. Carries NO identity data by
39
- * design — PII and the durable GUID never cross the browser. Parents use this purely to
40
- * decide what to render (nothing / anonymous chip / recognized chip).
41
- */
42
- RECOGNITION_STATE = "MOVMO_RECOGNITION_STATE",
43
- /**
44
- * iframe → parent: the short-lived (120s), single-use recognition token the airline page
45
- * forwards to its own backend. This is the ONLY identity-bearing value that ever crosses
46
- * the frame boundary, and it is opaque to the parent — the parent cannot read identity out
47
- * of it, only redeem it server-side.
48
- */
49
- RECOGNITION_TOKEN = "MOVMO_RECOGNITION_TOKEN",
50
- /** iframe → parent: requested wrapper size for banner/chip transitions. */
51
- RECOGNITION_RESIZE = "MOVMO_RECOGNITION_RESIZE",
52
- /**
53
- * iframe → parent: a user gesture requesting the parent start the Movmo OAuth (Flow A)
54
- * redirect.
55
- */
56
- RECOGNITION_CONNECT = "MOVMO_RECOGNITION_CONNECT",
57
- /**
58
- * iframe → parent: the recognition surface hit an internal failure (e.g. the
59
- * recognition-token mint errored) and could not complete (MOVMO-547). Always
60
- * accompanied by a RECOGNITION_STATE settling the surface (today: 'anonymous'),
61
- * so parents that ignore this message still render a consistent state — it exists
62
- * so the airline host can OBSERVE the failure (telemetry, fallback UX) instead of
63
- * mistaking it for an ordinary anonymous visitor.
64
- *
65
- * Privacy invariant (see RECOGNITION_STATE): the payload carries NO identity data
66
- * and the `code` is deliberately coarse — it must never reveal which internal call
67
- * failed, since that could imply the visitor's Movmo auth state before consent.
68
- */
69
- RECOGNITION_ERROR = "MOVMO_RECOGNITION_ERROR",
70
- /**
71
- * iframe → parent: the traveler clicked "Not you?" inside the recognition surface and
72
- * Movmo has already signed them out of Movmo in this browser (cookies only; other
73
- * devices unaffected). Sent once, always followed by `RECOGNITION_STATE 'anonymous'`.
74
- * Not sent on chip dismissal. The airline should clear its own session for this
75
- * traveler (greeting, pre-fill, any cookie carrying the GUID) — a GUID stored against
76
- * an authenticated airline account stays valid; sign-out is not consent revocation
77
- * (MOVMO-670).
78
- */
79
- RECOGNITION_SIGNED_OUT = "MOVMO_RECOGNITION_SIGNED_OUT"
80
- }
81
- export interface MovmoReadyMessage {
82
- type: MovmoFrameMessageType.READY;
83
- }
84
- export interface MovmoInitMessage {
85
- type: MovmoFrameMessageType.INIT;
86
- /** Origin of the embedding parent page; the iframe targets this for outbound messages. */
87
- parentOrigin: string;
88
- /** Set by SDKs that put `publickey-credentials-get` in the iframe `allow` attribute (MOVMO-686). */
89
- capabilities?: {
90
- passkeys?: boolean;
91
- };
92
- }
93
- export interface MovmoBookingCompleteMessage {
94
- type: MovmoFrameMessageType.BOOKING_COMPLETE;
95
- bookingId: string;
96
- /** Airline IATA / company code the booking was made under — NOT the PNR. */
97
- airlineRef?: string;
98
- providerId?: string;
99
- /**
100
- * Record locator (PNR) in the airline's own reservation system — what the traveler
101
- * quotes to the airline. Absent when the provider returned none, and from flights-ui
102
- * builds older than types 1.20.0.
103
- */
104
- airlinePnr?: string;
105
- }
106
- /**
107
- * Why the iframe is handing control back to the airline page (MOVMO-474).
108
- * Rides on BOOKING_FAILED rather than a new message type so that parents
109
- * built before v1.6.0 — which already close the overlay on BOOKING_FAILED —
110
- * keep working when a newer flights-ui sends an exit they don't understand.
111
- *
112
- * 'booking_confirmed' (MOVMO-521) is the success-path exit: the traveler
113
- * clicked "Return to {airline}" on the booking confirmation. Despite riding
114
- * on BOOKING_FAILED, the booking itself succeeded — a BOOKING_COMPLETE was
115
- * already sent for it.
116
- */
117
- export type MovmoExitReason = 'search_again' | 'offer_unavailable' | 'booking_confirmed';
118
- export interface MovmoBookingFailedMessage {
119
- type: MovmoFrameMessageType.BOOKING_FAILED;
120
- /**
121
- * @deprecated Legacy constant no handler reads; kept so pre-1.6.0 parent
122
- * typings keep compiling against this interface. Use `reason` instead.
123
- */
124
- action: 'search_again';
125
- /**
126
- * Optional so the field is additive: parents ≤1.5.0 ignore it and still
127
- * close the overlay; parents ≥1.6.0 pass it to the airline's onExit
128
- * callback. Absent means 'search_again' (messages from older flights-ui).
129
- */
130
- reason?: MovmoExitReason;
131
- }
132
- export interface MovmoRecognitionStateMessage {
133
- type: MovmoFrameMessageType.RECOGNITION_STATE;
134
- state: 'recognized' | 'anonymous' | 'none';
135
- }
136
- export interface MovmoRecognitionTokenMessage {
137
- type: MovmoFrameMessageType.RECOGNITION_TOKEN;
138
- token: string;
139
- }
140
- export interface MovmoRecognitionResizeMessage {
141
- type: MovmoFrameMessageType.RECOGNITION_RESIZE;
142
- width: number;
143
- height: number;
144
- }
145
- export interface MovmoRecognitionConnectMessage {
146
- type: MovmoFrameMessageType.RECOGNITION_CONNECT;
147
- }
148
- export interface MovmoRecognitionErrorMessage {
149
- type: MovmoFrameMessageType.RECOGNITION_ERROR;
150
- /**
151
- * Coarse machine-readable code. Known values: `recognition_failed` (the surface
152
- * could not complete recognition due to a service error). Typed as `string` so
153
- * older parents keep compiling/forwarding when newer iframes add codes.
154
- */
155
- code: string;
156
- /** Human-readable detail for the airline's logs. Never identity data. */
157
- message: string;
158
- }
159
- export interface MovmoRecognitionSignedOutMessage {
160
- type: MovmoFrameMessageType.RECOGNITION_SIGNED_OUT;
161
- }
162
- /** Discriminated union of every message exchanged across the frame boundary. */
163
- export type MovmoFrameMessage = MovmoReadyMessage | MovmoInitMessage | MovmoBookingCompleteMessage | MovmoBookingFailedMessage | MovmoRecognitionStateMessage | MovmoRecognitionTokenMessage | MovmoRecognitionResizeMessage | MovmoRecognitionConnectMessage | MovmoRecognitionErrorMessage | MovmoRecognitionSignedOutMessage;
164
- /** A per-environment origin allowlist (production vs. everything else). */
165
- export interface MovmoOriginAllowlist {
166
- prod: readonly string[];
167
- nonProd: readonly string[];
168
- }
169
- /**
170
- * Origins served by Movmo's flights-ui iframe. The PARENT
171
- * (`@movmo/express-checkout-button`) validates inbound messages against this list.
172
- */
173
- export declare const MOVMO_FLIGHTS_ORIGINS: MovmoOriginAllowlist;
174
- /**
175
- * Airline-partner origins permitted to embed the flights-ui iframe. The IFRAME
176
- * (flights-ui) validates the inbound handshake against this list.
177
- *
178
- * `prod` is intentionally empty until a real partner goes live in production; populate it
179
- * (or move it server-side, keyed by airline) as partners launch. The non-prod entries are
180
- * the cross-domain demo/test harness (MOVMO-430) plus local development.
181
- */
182
- export declare const MOVMO_PARTNER_ORIGINS: MovmoOriginAllowlist;
183
- export interface TrustedOriginOptions {
184
- isProd: boolean;
185
- /**
186
- * Extra origins to trust in NON-PROD only (e.g. an env-injected override URL such as
187
- * `REACT_APP_MOVMO_CHECKOUT_URL`). Ignored when `isProd` is true so a production build
188
- * always keeps its hardcoded allowlist. Entries may be full URLs (origin is extracted)
189
- * and `undefined`/empty values are skipped.
190
- */
191
- extraOrigins?: Array<string | undefined>;
192
- }
193
- /**
194
- * Returns true when `origin` is trusted for the given allowlist and environment.
195
- *
196
- * In production only `list.prod` is consulted (env overrides are ignored). In non-prod,
197
- * `list.nonProd` plus any valid `extraOrigins` are allowed.
198
- */
199
- export declare function isTrustedOrigin(origin: string, list: MovmoOriginAllowlist, { isProd, extraOrigins }: TrustedOriginOptions): boolean;
@@ -1,135 +0,0 @@
1
- "use strict";
2
- /**
3
- * postMessage contract shared by the Express Checkout iframe (flights-ui) and the
4
- * embedding parent page (`@movmo/express-checkout-button`).
5
- *
6
- * Both sides SHOULD coordinate exclusively via `window.postMessage` — no direct
7
- * cross-frame DOM access — validating every message against a strict origin allowlist in
8
- * both directions:
9
- *
10
- * - The PARENT should validate inbound messages against {@link MOVMO_FLIGHTS_ORIGINS}
11
- * ("is this really the Movmo checkout iframe I embedded?").
12
- * - The IFRAME should validate the inbound handshake against {@link MOVMO_PARTNER_ORIGINS}
13
- * ("is this parent page allowed to embed me and receive booking messages?").
14
- *
15
- * Handshake: on load the iframe posts {@link MovmoFrameMessageType.READY} (content-free)
16
- * to `"*"`; the parent replies with {@link MovmoFrameMessageType.INIT} carrying its own
17
- * origin, targeted at the iframe's origin. The iframe captures that origin so every
18
- * subsequent message goes to a specific origin instead of `"*"`.
19
- *
20
- * Adoption: both flights-ui (iframe) and `@movmo/express-checkout-button` (parent, as of
21
- * v1.4.0) consume this contract. Parent versions before v1.4.0 use their own hardcoded
22
- * origin list and perform no handshake.
23
- *
24
- * Note: payload field names are camelCase (browser `postMessage` data), a deliberate
25
- * departure from the snake_case Go-DTO convention used elsewhere in this package. Keep
26
- * them camelCase — the cross-repo consumers read these exact keys off the wire.
27
- */
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.MOVMO_PARTNER_ORIGINS = exports.MOVMO_FLIGHTS_ORIGINS = exports.MovmoFrameMessageType = void 0;
30
- exports.isTrustedOrigin = isTrustedOrigin;
31
- var MovmoFrameMessageType;
32
- (function (MovmoFrameMessageType) {
33
- /** iframe → parent: posted on load so the parent replies with INIT. Content-free. */
34
- MovmoFrameMessageType["READY"] = "MOVMO_READY";
35
- /** parent → iframe: handshake reply carrying the parent's origin so the iframe can
36
- * target subsequent messages instead of using `"*"`. */
37
- MovmoFrameMessageType["INIT"] = "MOVMO_INIT";
38
- /** iframe → parent: a booking finished successfully. */
39
- MovmoFrameMessageType["BOOKING_COMPLETE"] = "MOVMO_BOOKING_COMPLETE";
40
- /** iframe → parent: a booking failed in a non-retryable way. */
41
- MovmoFrameMessageType["BOOKING_FAILED"] = "MOVMO_BOOKING_FAILED";
42
- /**
43
- * iframe → parent: the recognition surface's current state. Carries NO identity data by
44
- * design — PII and the durable GUID never cross the browser. Parents use this purely to
45
- * decide what to render (nothing / anonymous chip / recognized chip).
46
- */
47
- MovmoFrameMessageType["RECOGNITION_STATE"] = "MOVMO_RECOGNITION_STATE";
48
- /**
49
- * iframe → parent: the short-lived (120s), single-use recognition token the airline page
50
- * forwards to its own backend. This is the ONLY identity-bearing value that ever crosses
51
- * the frame boundary, and it is opaque to the parent — the parent cannot read identity out
52
- * of it, only redeem it server-side.
53
- */
54
- MovmoFrameMessageType["RECOGNITION_TOKEN"] = "MOVMO_RECOGNITION_TOKEN";
55
- /** iframe → parent: requested wrapper size for banner/chip transitions. */
56
- MovmoFrameMessageType["RECOGNITION_RESIZE"] = "MOVMO_RECOGNITION_RESIZE";
57
- /**
58
- * iframe → parent: a user gesture requesting the parent start the Movmo OAuth (Flow A)
59
- * redirect.
60
- */
61
- MovmoFrameMessageType["RECOGNITION_CONNECT"] = "MOVMO_RECOGNITION_CONNECT";
62
- /**
63
- * iframe → parent: the recognition surface hit an internal failure (e.g. the
64
- * recognition-token mint errored) and could not complete (MOVMO-547). Always
65
- * accompanied by a RECOGNITION_STATE settling the surface (today: 'anonymous'),
66
- * so parents that ignore this message still render a consistent state — it exists
67
- * so the airline host can OBSERVE the failure (telemetry, fallback UX) instead of
68
- * mistaking it for an ordinary anonymous visitor.
69
- *
70
- * Privacy invariant (see RECOGNITION_STATE): the payload carries NO identity data
71
- * and the `code` is deliberately coarse — it must never reveal which internal call
72
- * failed, since that could imply the visitor's Movmo auth state before consent.
73
- */
74
- MovmoFrameMessageType["RECOGNITION_ERROR"] = "MOVMO_RECOGNITION_ERROR";
75
- /**
76
- * iframe → parent: the traveler clicked "Not you?" inside the recognition surface and
77
- * Movmo has already signed them out of Movmo in this browser (cookies only; other
78
- * devices unaffected). Sent once, always followed by `RECOGNITION_STATE 'anonymous'`.
79
- * Not sent on chip dismissal. The airline should clear its own session for this
80
- * traveler (greeting, pre-fill, any cookie carrying the GUID) — a GUID stored against
81
- * an authenticated airline account stays valid; sign-out is not consent revocation
82
- * (MOVMO-670).
83
- */
84
- MovmoFrameMessageType["RECOGNITION_SIGNED_OUT"] = "MOVMO_RECOGNITION_SIGNED_OUT";
85
- })(MovmoFrameMessageType || (exports.MovmoFrameMessageType = MovmoFrameMessageType = {}));
86
- /**
87
- * Origins served by Movmo's flights-ui iframe. The PARENT
88
- * (`@movmo/express-checkout-button`) validates inbound messages against this list.
89
- */
90
- exports.MOVMO_FLIGHTS_ORIGINS = {
91
- prod: ['https://flights.movmo.io'],
92
- nonProd: ['https://flights.e2e.movmo.io', 'http://localhost:3000'],
93
- };
94
- /**
95
- * Airline-partner origins permitted to embed the flights-ui iframe. The IFRAME
96
- * (flights-ui) validates the inbound handshake against this list.
97
- *
98
- * `prod` is intentionally empty until a real partner goes live in production; populate it
99
- * (or move it server-side, keyed by airline) as partners launch. The non-prod entries are
100
- * the cross-domain demo/test harness (MOVMO-430) plus local development.
101
- */
102
- exports.MOVMO_PARTNER_ORIGINS = {
103
- prod: [],
104
- nonProd: [
105
- 'https://mockairline-e2e.app.flyeasyapp.com',
106
- 'https://mockairline-e2e.app.movmoapp.com',
107
- 'http://localhost:3000',
108
- ],
109
- };
110
- /**
111
- * Returns true when `origin` is trusted for the given allowlist and environment.
112
- *
113
- * In production only `list.prod` is consulted (env overrides are ignored). In non-prod,
114
- * `list.nonProd` plus any valid `extraOrigins` are allowed.
115
- */
116
- function isTrustedOrigin(origin, list, { isProd, extraOrigins = [] }) {
117
- if (isProd) {
118
- return list.prod.includes(origin);
119
- }
120
- const allowed = [...list.nonProd];
121
- for (const extra of extraOrigins) {
122
- if (!extra)
123
- continue;
124
- try {
125
- allowed.push(new URL(extra).origin);
126
- }
127
- catch (_a) {
128
- // Stay fail-closed (a bad override never widens trust) but leave a breadcrumb —
129
- // a fat-fingered override URL vanishing silently is a debugging trap in
130
- // security-relevant code.
131
- console.warn(`[movmo] isTrustedOrigin: ignoring malformed extra origin "${extra}"`);
132
- }
133
- }
134
- return allowed.includes(origin);
135
- }