@oatscenter/trellis 0.100.0-rc.15 → 0.100.0-rc.17

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.
@@ -71,7 +71,6 @@ export declare class BrowserOAuthClient {
71
71
  issuer: string;
72
72
  clientId: string;
73
73
  credentialHandle: string;
74
- loopbackDevelopment?: boolean;
75
74
  }): Promise<Result<BrowserOAuthClient, AuthError>>;
76
75
  /** Revoke this app's refresh family and clear custody; does not log out of the Portal. */
77
76
  revoke(): Promise<Result<void, AuthError>>;
@@ -69,15 +69,14 @@ export class BrowserOAuthClient {
69
69
  static async open(options) {
70
70
  try {
71
71
  const issuer = new URL(options.issuer);
72
+ // Plain HTTP only reaches this machine, which browsers already trust.
72
73
  const loopback = ["localhost", "127.0.0.1", "[::1]"].includes(issuer.hostname);
73
74
  if (issuer.username ||
74
75
  issuer.password ||
75
76
  issuer.hash ||
76
77
  issuer.search ||
77
78
  (issuer.protocol !== "https:" &&
78
- !(options.loopbackDevelopment &&
79
- loopback &&
80
- issuer.protocol === "http:")))
79
+ !(loopback && issuer.protocol === "http:")))
81
80
  return err(new AuthError({ reason: "InvalidIssuer" }));
82
81
  const response = await fetch(`${issuer.href.replace(/\/+$/, "")}/.well-known/oauth-authorization-server`, {
83
82
  redirect: "error",
@@ -13,7 +13,6 @@ export type ClientAuthOptions = {
13
13
  /** Local multi-account slot; defaults to the registered client ID. */
14
14
  credentialHandle?: string;
15
15
  redirectTo: string;
16
- loopbackDevelopment?: boolean;
17
16
  currentUrl?: string;
18
17
  };
19
18
  /** Required authorization redirect, returned to the application's own navigation owner. */
package/client_connect.js CHANGED
@@ -24,7 +24,6 @@ export function connectClientWithDeps(args, deps) {
24
24
  issuer: args.trellisUrl,
25
25
  clientId: args.auth.clientId,
26
26
  credentialHandle: args.auth.credentialHandle ?? args.auth.clientId,
27
- loopbackDevelopment: args.auth.loopbackDevelopment,
28
27
  })).take();
29
28
  if (isErr(opened))
30
29
  return Result.err(opened.error);
@@ -1260,5 +1260,5 @@ declare const __api: {
1260
1260
  readonly packageEvidence: unknown;
1261
1261
  };
1262
1262
  export declare const API: typeof __api;
1263
- export declare const API_DIGEST: "LUcTB3jviCaJWBgxAKT7p1wmTgbKCTkfICbQTbNv5Xc";
1263
+ export declare const API_DIGEST: "YctGl000oKNnw5CPHoyUB7O-ETl5YTqFvuERkM_BhRM";
1264
1264
  export {};