@adelie/server 0.5.8 → 0.5.9

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.
@@ -1139,7 +1139,8 @@ interface ModelBalanceFailure {
1139
1139
  /**
1140
1140
  * How the authorization code travels back. `callback` sends the browser to a harness URL
1141
1141
  * the provider redirects to; `manual` asks the provider for a one-time code the user copies
1142
- * back by hand, for the case where that redirect cannot reach the harness.
1142
+ * back by hand, for the case where that redirect cannot reach the harness — or where the
1143
+ * provider would refuse it: only an HTTPS or loopback HTTP origin can be redirected to.
1143
1144
  */
1144
1145
  type ModelOAuthMode = "callback" | "manual";
1145
1146
  /**
@@ -1150,13 +1151,19 @@ type ModelOAuthMode = "callback" | "manual";
1150
1151
  interface ModelOAuthStartRequest {
1151
1152
  /** Provider group id (must be a catalog group that publishes a key-minting flow). */
1152
1153
  provider: string;
1153
- /** Defaults to `callback`. */
1154
+ /** Defaults to `callback`; the response says which mode the flow was opened in. */
1154
1155
  mode?: ModelOAuthMode;
1155
1156
  }
1156
1157
  /** The opaque flow handle plus the page to send the user to. No secret of the flow's is included. */
1157
1158
  interface ModelOAuthStartResponse {
1158
1159
  flowId: string;
1159
1160
  authorizeUrl: string;
1161
+ /**
1162
+ * The mode the flow was opened in: `manual` for a `callback` request when the origin the
1163
+ * request reached this server on is neither HTTPS nor loopback HTTP, which the provider's
1164
+ * authorization page refuses as a callback.
1165
+ */
1166
+ mode: ModelOAuthMode;
1160
1167
  }
1161
1168
  /** Why a flow failed, as a code the frontend phrases; never carries a code, a verifier or a key. */
1162
1169
  type ModelOAuthErrorCode = "invalid_request" | "code_rejected" | "upstream_failed" | "unreachable" | "apply_failed";
package/dist/api/types.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MACHINE_PHASES,
3
3
  TICKET_SLUG_PATTERN
4
- } from "../chunk-6IXN3YH4.js";
4
+ } from "../chunk-7ROH3XZA.js";
5
5
  import "../chunk-B5IP37ZQ.js";
6
6
  export {
7
7
  MACHINE_PHASES,
@@ -13,4 +13,4 @@ export {
13
13
  MACHINE_PHASES,
14
14
  TICKET_SLUG_PATTERN
15
15
  };
16
- //# sourceMappingURL=chunk-6IXN3YH4.js.map
16
+ //# sourceMappingURL=chunk-7ROH3XZA.js.map