@hraness/suite-accounts 0.9.21 → 0.9.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.
package/README.md CHANGED
@@ -17,6 +17,17 @@ links, and entitlements. Installing this package does not let a product
17
17
  register itself or pick its own issuer, JWKS endpoint, resource, callback,
18
18
  client ID, wire version, or trust algorithm.
19
19
 
20
+ ## Choose an integration task
21
+
22
+ For a new sign-in integration, [bind a registered client](#bind-a-registered-client) before choosing runtime imports from the [interface map](#interface-map). You need an Accounts registration; installing the package does not create one.
23
+
24
+ - [Trust path](#follow-the-trust-path): see what stays in the browser and what your server verifies.
25
+ - [Identity protocol](#use-the-identity-protocol): parse data without mistaking parsing for signature verification.
26
+ - [Public profiles](#public-profile-v2-contracts): validate revision-bound updates and use the optional React editor.
27
+ - [Fresh authentication](#fresh-authentication-for-server-owned-actions): request recent authentication separately from ordinary sign-in.
28
+ - [Frozen v1 compatibility](#frozen-v1-protocol-compatibility): distinguish historical parsing from current registrations.
29
+ - [Questions before integration](#questions-before-integration): check registration, authorization, and billing responsibilities.
30
+
20
31
  ## Install
21
32
 
22
33
  Pin the immutable release:
@@ -24,7 +35,7 @@ Pin the immutable release:
24
35
  ```json
25
36
  {
26
37
  "dependencies": {
27
- "@hraness/suite-accounts": "github:hraness/suite-accounts#v0.9.21"
38
+ "@hraness/suite-accounts": "github:hraness/suite-accounts#v0.9.23"
28
39
  }
29
40
  }
30
41
  ```
@@ -395,6 +406,9 @@ New registration remains an Accounts service change followed by a package
395
406
  release and an exact factory binding. Retired client identifiers and routes are
396
407
  rejected by current APIs.
397
408
 
409
+ The former aicharts browser client and its device-code grant are retired.
410
+ The site remains a public benchmark reference.
411
+
398
412
  The published v1 browser refresh-lock and session-notification channel strings
399
413
  retain their original values. Existing tabs therefore coordinate across a
400
414
  rolling package migration without a browser namespace cutover.
@@ -408,6 +422,10 @@ values.
408
422
  Each release is an immutable Git tag. [`CHANGELOG.md`](CHANGELOG.md) lists the
409
423
  changes and migration notes for each version.
410
424
 
425
+ When a pull request that bumps the `package.json` version merges and CI passes
426
+ on `main`, the matching `v<version>` tag is created automatically. Pushing the
427
+ tag by hand still works.
428
+
411
429
  ## Service boundary
412
430
 
413
431
  This repository does not contain billing prices or provider lookup keys,
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -382,6 +368,9 @@ function getPublicConsumer(consumer) {
382
368
  return isSuiteAccountsCurrentConsumerId(consumer) ? getSuiteAccountsCurrentConsumer(consumer) : getSuiteAccountsConsumer(consumer);
383
369
  }
384
370
  function parseSuiteAccountsPublicConfig(consumer, environment) {
371
+ if (!isSuiteAccountsCurrentConsumerId(consumer) && !isSuiteAccountsRegisteredConsumerId(consumer)) {
372
+ throw new Error("The Suite Accounts consumer is not registered.");
373
+ }
385
374
  const missing = SUITE_ACCOUNTS_PUBLIC_ENVIRONMENT_KEYS.filter((name) => {
386
375
  const value = environment[name];
387
376
  return typeof value !== "string" || value.trim() === "";
@@ -397,9 +386,6 @@ function parseSuiteAccountsPublicConfig(consumer, environment) {
397
386
  const convex = parseOrigin(deployment.url, "NEXT_PUBLIC_ACCOUNTS_CONVEX_URL");
398
387
  const loopback = [site, convex, convexSite].map((url) => LOOPBACK_HOSTS.has(url.hostname));
399
388
  if (loopback.every(Boolean)) {
400
- if (consumer === "aicharts") {
401
- throw new Error("AI Charts authentication requires its registered production origin.");
402
- }
403
389
  if (deployment.transport !== "local" || site.hostname !== convex.hostname || site.hostname !== convexSite.hostname) {
404
390
  throw new Error("Local consumer and Accounts endpoints must use the same loopback host.");
405
391
  }
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
package/dist/index.js CHANGED
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -987,6 +976,9 @@ function getPublicConsumer(consumer) {
987
976
  return isSuiteAccountsCurrentConsumerId(consumer) ? getSuiteAccountsCurrentConsumer(consumer) : getSuiteAccountsConsumer(consumer);
988
977
  }
989
978
  function parseSuiteAccountsPublicConfig(consumer, environment) {
979
+ if (!isSuiteAccountsCurrentConsumerId(consumer) && !isSuiteAccountsRegisteredConsumerId(consumer)) {
980
+ throw new Error("The Suite Accounts consumer is not registered.");
981
+ }
990
982
  const missing = SUITE_ACCOUNTS_PUBLIC_ENVIRONMENT_KEYS.filter((name) => {
991
983
  const value = environment[name];
992
984
  return typeof value !== "string" || value.trim() === "";
@@ -1002,9 +994,6 @@ function parseSuiteAccountsPublicConfig(consumer, environment) {
1002
994
  const convex = parseOrigin(deployment.url, "NEXT_PUBLIC_ACCOUNTS_CONVEX_URL");
1003
995
  const loopback = [site, convex, convexSite].map((url) => LOOPBACK_HOSTS.has(url.hostname));
1004
996
  if (loopback.every(Boolean)) {
1005
- if (consumer === "aicharts") {
1006
- throw new Error("AI Charts authentication requires its registered production origin.");
1007
- }
1008
997
  if (deployment.transport !== "local" || site.hostname !== convex.hostname || site.hostname !== convexSite.hostname) {
1009
998
  throw new Error("Local consumer and Accounts endpoints must use the same loopback host.");
1010
999
  }
package/dist/oidc-rp.js CHANGED
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
@@ -153,13 +153,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
153
153
  "oh-computer",
154
154
  "sponge",
155
155
  "peopleblade",
156
- "aicharts",
157
156
  "hraness",
158
157
  "soulscrape",
159
158
  "platonik",
160
159
  "ghostget",
161
160
  "alt",
162
- "algal",
163
161
  "textmock"
164
162
  ]);
165
163
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -179,13 +177,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
179
177
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
180
178
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
181
179
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
182
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
183
180
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
184
181
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
185
182
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
186
183
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
187
184
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
188
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
189
185
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
190
186
  });
191
187
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -214,24 +210,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
214
210
  "oh-computer",
215
211
  "sponge",
216
212
  "peopleblade",
217
- "aicharts",
218
213
  "hraness",
219
214
  "soulscrape",
220
215
  "platonik",
221
216
  "ghostget",
222
217
  "alt"
223
218
  ]);
224
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
225
- "algal-cli"
226
- ]);
227
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
228
- "algal-cli": {
229
- consumer: "algal",
230
- displayName: "Algal CLI",
231
- environments: ["production"],
232
- id: "algal-cli"
233
- }
234
- });
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
220
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
235
221
  function isSuiteAccountsConsumerId(value) {
236
222
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
237
223
  }
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -382,6 +368,9 @@ function getPublicConsumer(consumer) {
382
368
  return isSuiteAccountsCurrentConsumerId(consumer) ? getSuiteAccountsCurrentConsumer(consumer) : getSuiteAccountsConsumer(consumer);
383
369
  }
384
370
  function parseSuiteAccountsPublicConfig(consumer, environment) {
371
+ if (!isSuiteAccountsCurrentConsumerId(consumer) && !isSuiteAccountsRegisteredConsumerId(consumer)) {
372
+ throw new Error("The Suite Accounts consumer is not registered.");
373
+ }
385
374
  const missing = SUITE_ACCOUNTS_PUBLIC_ENVIRONMENT_KEYS.filter((name) => {
386
375
  const value = environment[name];
387
376
  return typeof value !== "string" || value.trim() === "";
@@ -397,9 +386,6 @@ function parseSuiteAccountsPublicConfig(consumer, environment) {
397
386
  const convex = parseOrigin(deployment.url, "NEXT_PUBLIC_ACCOUNTS_CONVEX_URL");
398
387
  const loopback = [site, convex, convexSite].map((url) => LOOPBACK_HOSTS.has(url.hostname));
399
388
  if (loopback.every(Boolean)) {
400
- if (consumer === "aicharts") {
401
- throw new Error("AI Charts authentication requires its registered production origin.");
402
- }
403
389
  if (deployment.transport !== "local" || site.hostname !== convex.hostname || site.hostname !== convexSite.hostname) {
404
390
  throw new Error("Local consumer and Accounts endpoints must use the same loopback host.");
405
391
  }
package/dist/registry.js CHANGED
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -1 +1 @@
1
- {"buildTools":[],"compiler":{"compilerContractVersion":"hraness-stylex-compiler-v1","css":{"filename":"stylex.css","layerPrelude":"complete-finite","targets":{"chrome":7143424,"firefox":7536640,"ios_saf":1049600,"safari":1049600},"topLevelLayers":["base","components"]},"schemaVersion":1,"serializer":{"enableLTRRTLComments":false,"useLayers":{"before":["components.hraness-ui.legacy.base","components.hraness-ui.legacy"],"prefix":"components.hraness-ui"}},"tools":{"babelCore":"7.29.7","lightningcss":"1.33.0","stylex":"0.19.0","stylexBabelCompatibility":{"entry":"lib/index.js","patchId":"stylex-0.19.0-token-parser-explicit-eof-v1","patchSha256":"4d17ac835421e037788f800035cfe91ee4fdce384ce97529d572015ea4318295","patchedSourceBytes":418119,"patchedSourceSha256":"32dfd685bf0ccc18c922ac6906cb911b05b081cc00c0fa6e100818d211abd1ba","sourceBytes":418079,"sourceSha256":"f880cd6733b91557647f1f894dbcbef7102199a112d1e8a6689fcf7b94f736c3"}},"transform":{"classNamePrefix":"x","dev":false,"enableMediaQueryOrder":true,"importSources":["@stylexjs/stylex"],"logicalRoot":"<graph-root>","moduleResolution":"commonJS","propertyValidationMode":"throw","sourceType":"unambiguous","styleResolution":"property-specificity","sxPropName":false,"treeshakeCompensation":true}},"compilerFoundation":"compiler-foundation.css","compilerSha256":"9ac2c8448ec8f198047e824ce27a97657e05025918c01c204aa0399f94641049","kind":"hraness-stylex-package-manifest","package":{"name":"@hraness/suite-accounts","version":"0.9.21"},"rules":[["x1aazh3f",{"ltr":".x1aazh3f{font-variant:inherit}","rtl":null},2000],["x1e6avla",{"ltr":".x1e6avla{border-radius:999px}","rtl":null},2000],["x1rcpt3j",{"ltr":".x1rcpt3j{gap:.45rem}","rtl":null},2000],["x1y0btm7",{"ltr":".x1y0btm7{border-style:solid}","rtl":null},2000],["x1y4qj14",{"ltr":".x1y4qj14{background-position:0% 0%}","rtl":null},2000],["x5goj4r",{"ltr":".x5goj4r{border-radius:.35rem}","rtl":null},2000],["x5m0csh",{"ltr":".x5m0csh{gap:.65rem}","rtl":null},2000],["x73f2yu",{"ltr":".x73f2yu{gap:.35rem}","rtl":null},2000],["x8fetqu",{"ltr":".x8fetqu{gap:1rem}","rtl":null},2000],["x9ox504",{"ltr":".x9ox504{border-color:var(--suite-profile-button-background,currentColor)}","rtl":null},2000],["xc342km",{"ltr":".xc342km{border-width:0}","rtl":null},2000],["xmkeg23",{"ltr":".xmkeg23{border-width:1px}","rtl":null},2000],["xxut2h2",{"ltr":".xxut2h2{border-color:var(--suite-profile-line,currentColor)}","rtl":null},2000],["x103pssi",{"ltr":".x103pssi{background-size:auto auto}","rtl":null},3000],["x10rt0pk",{"ltr":".x10rt0pk{font-feature-settings:inherit}","rtl":null},3000],["x12koezg",{"ltr":".x12koezg{background-origin:padding-box}","rtl":null},3000],["x15bjb6t",{"ltr":".x15bjb6t{line-height:inherit}","rtl":null},3000],["x182nak8",{"ltr":".x182nak8{background-repeat:repeat}","rtl":null},3000],["x18o3ruo",{"ltr":".x18o3ruo{background-image:none}","rtl":null},3000],["x18sabzy",{"ltr":".x18sabzy{border-image-source:none}","rtl":null},3000],["x1c7drp3",{"ltr":".x1c7drp3{accent-color:var(--suite-profile-focus,currentColor)}","rtl":null},3000],["x1e53mt7",{"ltr":".x1e53mt7{border-image-outset:0}","rtl":null},3000],["x1evy7pa",{"ltr":".x1evy7pa{line-height:1.5}","rtl":null},3000],["x1fdtg7e",{"ltr":".x1fdtg7e{background-attachment:scroll}","rtl":null},3000],["x1heor9g",{"ltr":".x1heor9g{color:inherit}","rtl":null},3000],["x1iyjqo2",{"ltr":".x1iyjqo2{flex-grow:1}","rtl":null},3000],["x1jfjhf8",{"ltr":".x1jfjhf8{background-color:var(--suite-profile-button-background,currentColor)}","rtl":null},3000],["x1jleocg",{"ltr":".x1jleocg{border-image-slice:100%}","rtl":null},3000],["x1lliihq",{"ltr":".x1lliihq{display:block}","rtl":null},3000],["x1lqcxt8",{"ltr":".x1lqcxt8{justify-self:start}","rtl":null},3000],["x1nrrp6k",{"ltr":".x1nrrp6k{font-size:.9rem}","rtl":null},3000],["x1pd3egz",{"ltr":".x1pd3egz{font-weight:inherit}","rtl":null},3000],["x1pjjote",{"ltr":".x1pjjote{border-image-width:1}","rtl":null},3000],["x1qlqyl8",{"ltr":".x1qlqyl8{font-size:inherit}","rtl":null},3000],["x1qzg9v8",{"ltr":".x1qzg9v8{font-size:.85rem}","rtl":null},3000],["x1rcybi7",{"ltr":".x1rcybi7{font-language-override:inherit}","rtl":null},3000],["x1t137rt",{"ltr":".x1t137rt{outline-style:none}","rtl":null},3000],["x1t35e8",{"ltr":".x1t35e8{font-style:inherit}","rtl":null},3000],["x1u7o2vf",{"ltr":".x1u7o2vf{background-clip:border-box}","rtl":null},3000],["x1w9dvvm",{"ltr":".x1w9dvvm{background-color:var(--suite-profile-input-background,transparent)}","rtl":null},3000],["x1xh6y1q",{"ltr":".x1xh6y1q{font-stretch:inherit}","rtl":null},3000],["x1xlr1w8",{"ltr":".x1xlr1w8{font-weight:700}","rtl":null},3000],["x1ypdohk",{"ltr":".x1ypdohk{cursor:pointer}","rtl":null},3000],["x288g5",{"ltr":".x288g5{resize:vertical}","rtl":null},3000],["x2lah0s",{"ltr":".x2lah0s{flex-shrink:0}","rtl":null},3000],["x37zpob",{"ltr":".x37zpob{line-height:1.4}","rtl":null},3000],["x5ee4ez",{"ltr":".x5ee4ez{color:var(--suite-profile-muted,currentColor)}","rtl":null},3000],["x61gc8y",{"ltr":".x61gc8y{font-optical-sizing:inherit}","rtl":null},3000],["x6s0dn4",{"ltr":".x6s0dn4{align-items:center}","rtl":null},3000],["x78zum5",{"ltr":".x78zum5{display:flex}","rtl":null},3000],["xd4aj15",{"ltr":".xd4aj15{font-size-adjust:inherit}","rtl":null},3000],["xd5ouml",{"ltr":".xd5ouml{color:var(--suite-profile-error,#a83232)}","rtl":null},3000],["xf9vgkq",{"ltr":".xf9vgkq{opacity:.72}","rtl":null},3000],["xgkqhyc",{"ltr":".xgkqhyc{border-image-repeat:stretch}","rtl":null},3000],["xj0a0fe",{"ltr":".xj0a0fe{overflow-wrap:anywhere}","rtl":null},3000],["xjb2p0i",{"ltr":".xjb2p0i{font-family:inherit}","rtl":null},3000],["xjbqb8w",{"ltr":".xjbqb8w{background-color:transparent}","rtl":null},3000],["xkyhvkk",{"ltr":".xkyhvkk{font-variation-settings:inherit}","rtl":null},3000],["xo1l8bm",{"ltr":".xo1l8bm{font-weight:400}","rtl":null},3000],["xrvj5dj",{"ltr":".xrvj5dj{display:grid}","rtl":null},3000],["xs83m0k",{"ltr":".xs83m0k{flex-shrink:1}","rtl":null},3000],["xt0e3qv",{"ltr":".xt0e3qv{cursor:default}","rtl":null},3000],["xuxw1ft",{"ltr":".xuxw1ft{white-space:nowrap}","rtl":null},3000],["xvmqkbn",{"ltr":".xvmqkbn{font-kerning:inherit}","rtl":null},3000],["xz46ci",{"ltr":".xz46ci{color:var(--suite-profile-button-foreground,Canvas)}","rtl":null},3000],["x14xc8xn",{"ltr":".x14xc8xn:focus-within{outline-style:solid}","rtl":null},3040],["x16gxa91",{"ltr":".x16gxa91:focus-within{outline-width:2px}","rtl":null},3040],["x1fanpfn",{"ltr":".x1fanpfn:focus-within{outline-offset:2px}","rtl":null},3040],["x1p4mulw",{"ltr":".x1p4mulw:focus-within{outline-color:var(--suite-profile-focus,currentColor)}","rtl":null},3040],["x784prv",{"ltr":".x784prv:focus-visible{outline-width:2px}","rtl":null},3040],["x7s97pk",{"ltr":".x7s97pk:focus-visible{outline-offset:2px}","rtl":null},3040],["x9v5kkp",{"ltr":".x9v5kkp:focus-visible{outline-style:solid}","rtl":null},3040],["xo8l03z",{"ltr":".xo8l03z:focus-visible{outline-color:var(--suite-profile-focus,currentColor)}","rtl":null},3040],["xc4xxb1",{"ltr":".xc4xxb1:has(:disabled){opacity:.6}","rtl":null},3045],["xfqoyci",{"ltr":".xfqoyci:disabled{opacity:.6}","rtl":null},3092],["xjb0foi",{"ltr":".xjb0foi:disabled{cursor:wait}","rtl":null},3092],["x13zjp5t",{"ltr":".x13zjp5t{margin-left:.5rem}","rtl":null},4000],["x15u6esi",{"ltr":".x15u6esi{padding-left:.5rem}","rtl":null},4000],["x15y8ph0",{"ltr":".x15y8ph0{padding-top:.7rem}","rtl":null},4000],["x178xt8z",{"ltr":".x178xt8z{border-top-width:1px}","rtl":null},4000],["x18d9i69",{"ltr":".x18d9i69{padding-bottom:0}","rtl":null},4000],["x19hwnzc",{"ltr":".x19hwnzc{min-width:2rem}","rtl":null},4000],["x1b58sdr",{"ltr":".x1b58sdr{padding-top:.5rem}","rtl":null},4000],["x1flg24d",{"ltr":".x1flg24d{padding-top:.65rem}","rtl":null},4000],["x1iul6r4",{"ltr":".x1iul6r4{padding-top:.25rem}","rtl":null},4000],["x1mjqqkp",{"ltr":".x1mjqqkp{margin-top:.5rem}","rtl":null},4000],["x1q57ora",{"ltr":".x1q57ora{padding-top:.75rem}","rtl":null},4000],["x1qhh985",{"ltr":".x1qhh985{border-bottom-width:0}","rtl":null},4000],["x1uhho1l",{"ltr":".x1uhho1l{padding-left:0}","rtl":null},4000],["x1xpa7k",{"ltr":".x1xpa7k{padding-right:0}","rtl":null},4000],["x1yf7rl7",{"ltr":".x1yf7rl7{margin-right:0}","rtl":null},4000],["x33uob6",{"ltr":".x33uob6{padding-right:.75rem}","rtl":null},4000],["x4odjur",{"ltr":".x4odjur{padding-bottom:.65rem}","rtl":null},4000],["x52dz5p",{"ltr":".x52dz5p{padding-right:1rem}","rtl":null},4000],["x79ra4s",{"ltr":".x79ra4s{padding-left:.75rem}","rtl":null},4000],["x9dzeaa",{"ltr":".x9dzeaa{padding-left:1rem}","rtl":null},4000],["xat24cr",{"ltr":".xat24cr{margin-bottom:0}","rtl":null},4000],["xdddoky",{"ltr":".xdddoky{height:1.05rem}","rtl":null},4000],["xdj266r",{"ltr":".xdj266r{margin-top:0}","rtl":null},4000],["xes99ow",{"ltr":".xes99ow{padding-bottom:.25rem}","rtl":null},4000],["xeuugli",{"ltr":".xeuugli{min-width:0}","rtl":null},4000],["xf6x3ch",{"ltr":".xf6x3ch{width:1.05rem}","rtl":null},4000],["xgbkey0",{"ltr":".xgbkey0{min-height:2.75rem}","rtl":null},4000],["xgfja2r",{"ltr":".xgfja2r{border-right-width:0}","rtl":null},4000],["xh8yej3",{"ltr":".xh8yej3{width:100%}","rtl":null},4000],["xhbfen4",{"ltr":".xhbfen4{margin-bottom:.5rem}","rtl":null},4000],["xhdxxi3",{"ltr":".xhdxxi3{height:1.1rem}","rtl":null},4000],["xj3b58b",{"ltr":".xj3b58b{margin-left:0}","rtl":null},4000],["xmh2cwo",{"ltr":".xmh2cwo{width:1.1rem}","rtl":null},4000],["xvgi8cs",{"ltr":".xvgi8cs{padding-bottom:.7rem}","rtl":null},4000],["xyj58a3",{"ltr":".xyj58a3{border-left-width:0}","rtl":null},4000]],"rulesSha256":"31d7dc6f52eff49071378eef338d3387292c4c85c462a6602bc4d5f421fc818a","runtime":[{"bytes":72118,"path":"dist/profile-form.js","sha256":"c854ce33978764807c9f7ddc8143a55802ba7e44fa996f423988a09f266effac"}],"schemaVersion":1,"standaloneCss":{"bytes":5493,"path":"dist/stylex.css","sha256":"e52f05b747b1bc28882df95109a7156d8b0517489de315f3cc5119ccc0d84104"},"standaloneSerializer":{"before":["components.hraness-suite-accounts.legacy"],"prefix":"components.hraness-suite-accounts"},"stylesheets":[{"bytes":83,"path":"compiler-foundation.css","sha256":"71172943d9ba5c6194bddf8a8f41c3bd35eb77919a20660019b12e9c2f8849e7"},{"bytes":30,"path":"src/profile-form.css","sha256":"4d4716e779cb53a65a4789db3b4c1340593a3d63d562bab16be8ec704157586c"}]}
1
+ {"buildTools":[],"compiler":{"compilerContractVersion":"hraness-stylex-compiler-v1","css":{"filename":"stylex.css","layerPrelude":"complete-finite","targets":{"chrome":7143424,"firefox":7536640,"ios_saf":1049600,"safari":1049600},"topLevelLayers":["base","components"]},"schemaVersion":1,"serializer":{"enableLTRRTLComments":false,"useLayers":{"before":["components.hraness-ui.legacy.base","components.hraness-ui.legacy"],"prefix":"components.hraness-ui"}},"tools":{"babelCore":"7.29.7","lightningcss":"1.33.0","stylex":"0.19.0","stylexBabelCompatibility":{"entry":"lib/index.js","patchId":"stylex-0.19.0-token-parser-explicit-eof-v1","patchSha256":"4d17ac835421e037788f800035cfe91ee4fdce384ce97529d572015ea4318295","patchedSourceBytes":418119,"patchedSourceSha256":"32dfd685bf0ccc18c922ac6906cb911b05b081cc00c0fa6e100818d211abd1ba","sourceBytes":418079,"sourceSha256":"f880cd6733b91557647f1f894dbcbef7102199a112d1e8a6689fcf7b94f736c3"}},"transform":{"classNamePrefix":"x","dev":false,"enableMediaQueryOrder":true,"importSources":["@stylexjs/stylex"],"logicalRoot":"<graph-root>","moduleResolution":"commonJS","propertyValidationMode":"throw","sourceType":"unambiguous","styleResolution":"property-specificity","sxPropName":false,"treeshakeCompensation":true}},"compilerFoundation":"compiler-foundation.css","compilerSha256":"9ac2c8448ec8f198047e824ce27a97657e05025918c01c204aa0399f94641049","kind":"hraness-stylex-package-manifest","package":{"name":"@hraness/suite-accounts","version":"0.9.23"},"rules":[["x1aazh3f",{"ltr":".x1aazh3f{font-variant:inherit}","rtl":null},2000],["x1e6avla",{"ltr":".x1e6avla{border-radius:999px}","rtl":null},2000],["x1rcpt3j",{"ltr":".x1rcpt3j{gap:.45rem}","rtl":null},2000],["x1y0btm7",{"ltr":".x1y0btm7{border-style:solid}","rtl":null},2000],["x1y4qj14",{"ltr":".x1y4qj14{background-position:0% 0%}","rtl":null},2000],["x5goj4r",{"ltr":".x5goj4r{border-radius:.35rem}","rtl":null},2000],["x5m0csh",{"ltr":".x5m0csh{gap:.65rem}","rtl":null},2000],["x73f2yu",{"ltr":".x73f2yu{gap:.35rem}","rtl":null},2000],["x8fetqu",{"ltr":".x8fetqu{gap:1rem}","rtl":null},2000],["x9ox504",{"ltr":".x9ox504{border-color:var(--suite-profile-button-background,currentColor)}","rtl":null},2000],["xc342km",{"ltr":".xc342km{border-width:0}","rtl":null},2000],["xmkeg23",{"ltr":".xmkeg23{border-width:1px}","rtl":null},2000],["xxut2h2",{"ltr":".xxut2h2{border-color:var(--suite-profile-line,currentColor)}","rtl":null},2000],["x103pssi",{"ltr":".x103pssi{background-size:auto auto}","rtl":null},3000],["x10rt0pk",{"ltr":".x10rt0pk{font-feature-settings:inherit}","rtl":null},3000],["x12koezg",{"ltr":".x12koezg{background-origin:padding-box}","rtl":null},3000],["x15bjb6t",{"ltr":".x15bjb6t{line-height:inherit}","rtl":null},3000],["x182nak8",{"ltr":".x182nak8{background-repeat:repeat}","rtl":null},3000],["x18o3ruo",{"ltr":".x18o3ruo{background-image:none}","rtl":null},3000],["x18sabzy",{"ltr":".x18sabzy{border-image-source:none}","rtl":null},3000],["x1c7drp3",{"ltr":".x1c7drp3{accent-color:var(--suite-profile-focus,currentColor)}","rtl":null},3000],["x1e53mt7",{"ltr":".x1e53mt7{border-image-outset:0}","rtl":null},3000],["x1evy7pa",{"ltr":".x1evy7pa{line-height:1.5}","rtl":null},3000],["x1fdtg7e",{"ltr":".x1fdtg7e{background-attachment:scroll}","rtl":null},3000],["x1heor9g",{"ltr":".x1heor9g{color:inherit}","rtl":null},3000],["x1iyjqo2",{"ltr":".x1iyjqo2{flex-grow:1}","rtl":null},3000],["x1jfjhf8",{"ltr":".x1jfjhf8{background-color:var(--suite-profile-button-background,currentColor)}","rtl":null},3000],["x1jleocg",{"ltr":".x1jleocg{border-image-slice:100%}","rtl":null},3000],["x1lliihq",{"ltr":".x1lliihq{display:block}","rtl":null},3000],["x1lqcxt8",{"ltr":".x1lqcxt8{justify-self:start}","rtl":null},3000],["x1nrrp6k",{"ltr":".x1nrrp6k{font-size:.9rem}","rtl":null},3000],["x1pd3egz",{"ltr":".x1pd3egz{font-weight:inherit}","rtl":null},3000],["x1pjjote",{"ltr":".x1pjjote{border-image-width:1}","rtl":null},3000],["x1qlqyl8",{"ltr":".x1qlqyl8{font-size:inherit}","rtl":null},3000],["x1qzg9v8",{"ltr":".x1qzg9v8{font-size:.85rem}","rtl":null},3000],["x1rcybi7",{"ltr":".x1rcybi7{font-language-override:inherit}","rtl":null},3000],["x1t137rt",{"ltr":".x1t137rt{outline-style:none}","rtl":null},3000],["x1t35e8",{"ltr":".x1t35e8{font-style:inherit}","rtl":null},3000],["x1u7o2vf",{"ltr":".x1u7o2vf{background-clip:border-box}","rtl":null},3000],["x1w9dvvm",{"ltr":".x1w9dvvm{background-color:var(--suite-profile-input-background,transparent)}","rtl":null},3000],["x1xh6y1q",{"ltr":".x1xh6y1q{font-stretch:inherit}","rtl":null},3000],["x1xlr1w8",{"ltr":".x1xlr1w8{font-weight:700}","rtl":null},3000],["x1ypdohk",{"ltr":".x1ypdohk{cursor:pointer}","rtl":null},3000],["x288g5",{"ltr":".x288g5{resize:vertical}","rtl":null},3000],["x2lah0s",{"ltr":".x2lah0s{flex-shrink:0}","rtl":null},3000],["x37zpob",{"ltr":".x37zpob{line-height:1.4}","rtl":null},3000],["x5ee4ez",{"ltr":".x5ee4ez{color:var(--suite-profile-muted,currentColor)}","rtl":null},3000],["x61gc8y",{"ltr":".x61gc8y{font-optical-sizing:inherit}","rtl":null},3000],["x6s0dn4",{"ltr":".x6s0dn4{align-items:center}","rtl":null},3000],["x78zum5",{"ltr":".x78zum5{display:flex}","rtl":null},3000],["xd4aj15",{"ltr":".xd4aj15{font-size-adjust:inherit}","rtl":null},3000],["xd5ouml",{"ltr":".xd5ouml{color:var(--suite-profile-error,#a83232)}","rtl":null},3000],["xf9vgkq",{"ltr":".xf9vgkq{opacity:.72}","rtl":null},3000],["xgkqhyc",{"ltr":".xgkqhyc{border-image-repeat:stretch}","rtl":null},3000],["xj0a0fe",{"ltr":".xj0a0fe{overflow-wrap:anywhere}","rtl":null},3000],["xjb2p0i",{"ltr":".xjb2p0i{font-family:inherit}","rtl":null},3000],["xjbqb8w",{"ltr":".xjbqb8w{background-color:transparent}","rtl":null},3000],["xkyhvkk",{"ltr":".xkyhvkk{font-variation-settings:inherit}","rtl":null},3000],["xo1l8bm",{"ltr":".xo1l8bm{font-weight:400}","rtl":null},3000],["xrvj5dj",{"ltr":".xrvj5dj{display:grid}","rtl":null},3000],["xs83m0k",{"ltr":".xs83m0k{flex-shrink:1}","rtl":null},3000],["xt0e3qv",{"ltr":".xt0e3qv{cursor:default}","rtl":null},3000],["xuxw1ft",{"ltr":".xuxw1ft{white-space:nowrap}","rtl":null},3000],["xvmqkbn",{"ltr":".xvmqkbn{font-kerning:inherit}","rtl":null},3000],["xz46ci",{"ltr":".xz46ci{color:var(--suite-profile-button-foreground,Canvas)}","rtl":null},3000],["x14xc8xn",{"ltr":".x14xc8xn:focus-within{outline-style:solid}","rtl":null},3040],["x16gxa91",{"ltr":".x16gxa91:focus-within{outline-width:2px}","rtl":null},3040],["x1fanpfn",{"ltr":".x1fanpfn:focus-within{outline-offset:2px}","rtl":null},3040],["x1p4mulw",{"ltr":".x1p4mulw:focus-within{outline-color:var(--suite-profile-focus,currentColor)}","rtl":null},3040],["x784prv",{"ltr":".x784prv:focus-visible{outline-width:2px}","rtl":null},3040],["x7s97pk",{"ltr":".x7s97pk:focus-visible{outline-offset:2px}","rtl":null},3040],["x9v5kkp",{"ltr":".x9v5kkp:focus-visible{outline-style:solid}","rtl":null},3040],["xo8l03z",{"ltr":".xo8l03z:focus-visible{outline-color:var(--suite-profile-focus,currentColor)}","rtl":null},3040],["xc4xxb1",{"ltr":".xc4xxb1:has(:disabled){opacity:.6}","rtl":null},3045],["xfqoyci",{"ltr":".xfqoyci:disabled{opacity:.6}","rtl":null},3092],["xjb0foi",{"ltr":".xjb0foi:disabled{cursor:wait}","rtl":null},3092],["x13zjp5t",{"ltr":".x13zjp5t{margin-left:.5rem}","rtl":null},4000],["x15u6esi",{"ltr":".x15u6esi{padding-left:.5rem}","rtl":null},4000],["x15y8ph0",{"ltr":".x15y8ph0{padding-top:.7rem}","rtl":null},4000],["x178xt8z",{"ltr":".x178xt8z{border-top-width:1px}","rtl":null},4000],["x18d9i69",{"ltr":".x18d9i69{padding-bottom:0}","rtl":null},4000],["x19hwnzc",{"ltr":".x19hwnzc{min-width:2rem}","rtl":null},4000],["x1b58sdr",{"ltr":".x1b58sdr{padding-top:.5rem}","rtl":null},4000],["x1flg24d",{"ltr":".x1flg24d{padding-top:.65rem}","rtl":null},4000],["x1iul6r4",{"ltr":".x1iul6r4{padding-top:.25rem}","rtl":null},4000],["x1mjqqkp",{"ltr":".x1mjqqkp{margin-top:.5rem}","rtl":null},4000],["x1q57ora",{"ltr":".x1q57ora{padding-top:.75rem}","rtl":null},4000],["x1qhh985",{"ltr":".x1qhh985{border-bottom-width:0}","rtl":null},4000],["x1uhho1l",{"ltr":".x1uhho1l{padding-left:0}","rtl":null},4000],["x1xpa7k",{"ltr":".x1xpa7k{padding-right:0}","rtl":null},4000],["x1yf7rl7",{"ltr":".x1yf7rl7{margin-right:0}","rtl":null},4000],["x33uob6",{"ltr":".x33uob6{padding-right:.75rem}","rtl":null},4000],["x4odjur",{"ltr":".x4odjur{padding-bottom:.65rem}","rtl":null},4000],["x52dz5p",{"ltr":".x52dz5p{padding-right:1rem}","rtl":null},4000],["x79ra4s",{"ltr":".x79ra4s{padding-left:.75rem}","rtl":null},4000],["x9dzeaa",{"ltr":".x9dzeaa{padding-left:1rem}","rtl":null},4000],["xat24cr",{"ltr":".xat24cr{margin-bottom:0}","rtl":null},4000],["xdddoky",{"ltr":".xdddoky{height:1.05rem}","rtl":null},4000],["xdj266r",{"ltr":".xdj266r{margin-top:0}","rtl":null},4000],["xes99ow",{"ltr":".xes99ow{padding-bottom:.25rem}","rtl":null},4000],["xeuugli",{"ltr":".xeuugli{min-width:0}","rtl":null},4000],["xf6x3ch",{"ltr":".xf6x3ch{width:1.05rem}","rtl":null},4000],["xgbkey0",{"ltr":".xgbkey0{min-height:2.75rem}","rtl":null},4000],["xgfja2r",{"ltr":".xgfja2r{border-right-width:0}","rtl":null},4000],["xh8yej3",{"ltr":".xh8yej3{width:100%}","rtl":null},4000],["xhbfen4",{"ltr":".xhbfen4{margin-bottom:.5rem}","rtl":null},4000],["xhdxxi3",{"ltr":".xhdxxi3{height:1.1rem}","rtl":null},4000],["xj3b58b",{"ltr":".xj3b58b{margin-left:0}","rtl":null},4000],["xmh2cwo",{"ltr":".xmh2cwo{width:1.1rem}","rtl":null},4000],["xvgi8cs",{"ltr":".xvgi8cs{padding-bottom:.7rem}","rtl":null},4000],["xyj58a3",{"ltr":".xyj58a3{border-left-width:0}","rtl":null},4000]],"rulesSha256":"31d7dc6f52eff49071378eef338d3387292c4c85c462a6602bc4d5f421fc818a","runtime":[{"bytes":71791,"path":"dist/profile-form.js","sha256":"84824f4d305cd4d19cd8ecf195a45dd8ca5b2385f9aadc184edbaccf240a6fec"}],"schemaVersion":1,"standaloneCss":{"bytes":5493,"path":"dist/stylex.css","sha256":"e52f05b747b1bc28882df95109a7156d8b0517489de315f3cc5119ccc0d84104"},"standaloneSerializer":{"before":["components.hraness-suite-accounts.legacy"],"prefix":"components.hraness-suite-accounts"},"stylesheets":[{"bytes":83,"path":"compiler-foundation.css","sha256":"71172943d9ba5c6194bddf8a8f41c3bd35eb77919a20660019b12e9c2f8849e7"},{"bytes":30,"path":"src/profile-form.css","sha256":"4d4716e779cb53a65a4789db3b4c1340593a3d63d562bab16be8ec704157586c"}]}
package/dist/urls.js CHANGED
@@ -152,13 +152,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
152
152
  "oh-computer",
153
153
  "sponge",
154
154
  "peopleblade",
155
- "aicharts",
156
155
  "hraness",
157
156
  "soulscrape",
158
157
  "platonik",
159
158
  "ghostget",
160
159
  "alt",
161
- "algal",
162
160
  "textmock"
163
161
  ]);
164
162
  function currentOidcSite(id, displayName, productionSiteUrl) {
@@ -178,13 +176,11 @@ var SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
178
176
  "oh-computer": SUITE_ACCOUNTS_CONSUMERS["oh-computer"],
179
177
  sponge: currentOidcSite("sponge", "Sponge", SUITE_ACCOUNTS_CURRENT_ORIGIN_OVERRIDES.sponge.production.siteUrl),
180
178
  peopleblade: currentOidcSite("peopleblade", "PeopleBlade", "https://peopleblade.com"),
181
- aicharts: currentOidcSite("aicharts", "AI Charts", "https://aicharts.io"),
182
179
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
183
180
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
184
181
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
185
182
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
186
183
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
187
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
188
184
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com")
189
185
  });
190
186
  var SUITE_ACCOUNTS_ACTIVE_CONSUMER_IDS = deepFreeze([
@@ -213,24 +209,14 @@ var SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS = deepFreeze([
213
209
  "oh-computer",
214
210
  "sponge",
215
211
  "peopleblade",
216
- "aicharts",
217
212
  "hraness",
218
213
  "soulscrape",
219
214
  "platonik",
220
215
  "ghostget",
221
216
  "alt"
222
217
  ]);
223
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
224
- "algal-cli"
225
- ]);
226
- var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
227
- "algal-cli": {
228
- consumer: "algal",
229
- displayName: "Algal CLI",
230
- environments: ["production"],
231
- id: "algal-cli"
232
- }
233
- });
218
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([]);
219
+ var SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({});
234
220
  function isSuiteAccountsConsumerId(value) {
235
221
  return typeof value === "string" && SUITE_CONSUMER_IDS.includes(value);
236
222
  }
@@ -340,6 +326,9 @@ function suiteAccountsCurrentOidcClientRequiresEmailOtp(clientId) {
340
326
  return SUITE_ACCOUNTS_CURRENT_EMAIL_OTP_REQUIRED_OIDC_CONSUMER_IDS.some((consumer) => suiteAccountsCurrentOidcClientRegistration(consumer, "production")?.clientId === clientId);
341
327
  }
342
328
  var DEVICE_CODE_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:device_code";
329
+ function formatDeviceClientId(id, environment) {
330
+ return `hraness:${id}:${environment}:v1`;
331
+ }
343
332
  function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment) {
344
333
  if (!isSuiteAccountsCurrentDeviceClientId(deviceClient))
345
334
  return null;
@@ -348,7 +337,7 @@ function suiteAccountsCurrentDeviceClientRegistration(deviceClient, environment)
348
337
  return null;
349
338
  }
350
339
  return deepFreeze({
351
- clientId: `hraness:${deviceClient}:${environment}:v1`,
340
+ clientId: formatDeviceClientId(deviceClient, environment),
352
341
  consumer: registration.consumer,
353
342
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
354
343
  redirectUris: [],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hraness/suite-accounts",
3
- "version": "0.9.21",
3
+ "version": "0.9.23",
4
4
  "description": "Validated client and protocol boundaries for Hraness Accounts.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,7 +8,7 @@
8
8
  "name": "@hraness/suite-accounts",
9
9
  "path": ".",
10
10
  "visibility": "public",
11
- "version": "0.9.21"
11
+ "version": "0.9.23"
12
12
  }
13
13
  ],
14
14
  "dependencies": [
@@ -7,6 +7,7 @@ import {
7
7
  getSuiteAccountsConsumer,
8
8
  getSuiteAccountsDeployment,
9
9
  isSuiteAccountsCurrentConsumerId,
10
+ isSuiteAccountsRegisteredConsumerId,
10
11
  type SuiteAccountsAuthConfiguration,
11
12
  type SuiteAccountsCurrentConsumerId,
12
13
  type SuiteAccountsEnvironment,
@@ -159,6 +160,9 @@ export function parseSuiteAccountsPublicConfig(
159
160
  consumer: SuiteAccountsPublicConsumerId,
160
161
  environment: SuiteAccountsPublicEnvironment,
161
162
  ): Exclude<SuiteAccountsPublicConfig, { kind: "invalid" }> {
163
+ if (!isSuiteAccountsCurrentConsumerId(consumer) && !isSuiteAccountsRegisteredConsumerId(consumer)) {
164
+ throw new Error("The Suite Accounts consumer is not registered.");
165
+ }
162
166
  const missing = SUITE_ACCOUNTS_PUBLIC_ENVIRONMENT_KEYS.filter((name) => {
163
167
  const value = environment[name];
164
168
  return typeof value !== "string" || value.trim() === "";
@@ -191,13 +195,6 @@ export function parseSuiteAccountsPublicConfig(
191
195
  LOOPBACK_HOSTS.has(url.hostname)
192
196
  );
193
197
  if (loopback.every(Boolean)) {
194
- // This new registration has no local trust surface. Preserve existing
195
- // consumers' released loopback behavior below.
196
- if (consumer === "aicharts") {
197
- throw new Error(
198
- "AI Charts authentication requires its registered production origin.",
199
- );
200
- }
201
198
  if (
202
199
  deployment.transport !== "local"
203
200
  || site.hostname !== convex.hostname
package/src/registry.ts CHANGED
@@ -220,13 +220,11 @@ export const SUITE_ACCOUNTS_CURRENT_CONSUMER_IDS = deepFreeze([
220
220
  "oh-computer",
221
221
  "sponge",
222
222
  "peopleblade",
223
- "aicharts",
224
223
  "hraness",
225
224
  "soulscrape",
226
225
  "platonik",
227
226
  "ghostget",
228
227
  "alt",
229
- "algal",
230
228
  "textmock",
231
229
  ] as const);
232
230
 
@@ -277,17 +275,11 @@ export const SUITE_ACCOUNTS_CURRENT_CONSUMERS = deepFreeze({
277
275
  "PeopleBlade",
278
276
  "https://peopleblade.com",
279
277
  ),
280
- aicharts: currentOidcSite(
281
- "aicharts",
282
- "AI Charts",
283
- "https://aicharts.io",
284
- ),
285
278
  hraness: currentOidcSite("hraness", "Hraness", "https://hraness.com"),
286
279
  soulscrape: currentOidcSite("soulscrape", "Soulscrape", "https://soulscrape.com"),
287
280
  platonik: currentOidcSite("platonik", "Platonik", "https://platonik.space"),
288
281
  ghostget: currentOidcSite("ghostget", "Ghostget", "https://ghostget.com"),
289
282
  alt: currentOidcSite("alt", "Alt", "https://alt.dog"),
290
- algal: currentOidcSite("algal", "Algal", "https://algal.cloud"),
291
283
  textmock: currentOidcSite("textmock", "Textmock", "https://textmock.com"),
292
284
  } as const satisfies Readonly<
293
285
  Record<
@@ -393,7 +385,6 @@ export const SUITE_ACCOUNTS_CURRENT_BROWSER_DEVICE_CODE_CONSUMER_IDS =
393
385
  "oh-computer",
394
386
  "sponge",
395
387
  "peopleblade",
396
- "aicharts",
397
388
  "hraness",
398
389
  "soulscrape",
399
390
  "platonik",
@@ -407,11 +398,9 @@ export type SuiteAccountsCurrentBrowserDeviceCodeConsumerId =
407
398
  /**
408
399
  * Dedicated public device-authorization clients. Each one belongs to exactly
409
400
  * one current browser product, has no redirect URI, and may use only the
410
- * device-code grant.
401
+ * device-code grant. No dedicated clients are currently registered.
411
402
  */
412
- export const SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([
413
- "algal-cli",
414
- ] as const);
403
+ export const SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS = deepFreeze([] as const);
415
404
 
416
405
  export type SuiteAccountsCurrentDeviceClientId =
417
406
  (typeof SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENT_IDS)[number];
@@ -426,14 +415,7 @@ export type SuiteAccountsCurrentDeviceClient = Readonly<{
426
415
  id: SuiteAccountsCurrentDeviceClientId;
427
416
  }>;
428
417
 
429
- export const SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({
430
- "algal-cli": {
431
- consumer: "algal",
432
- displayName: "Algal CLI",
433
- environments: ["production"],
434
- id: "algal-cli",
435
- },
436
- } as const satisfies Readonly<
418
+ export const SUITE_ACCOUNTS_CURRENT_DEVICE_CLIENTS = deepFreeze({} as const satisfies Readonly<
437
419
  Record<SuiteAccountsCurrentDeviceClientId, SuiteAccountsCurrentDeviceClient>
438
420
  >);
439
421
 
package/src/urls.ts CHANGED
@@ -159,6 +159,13 @@ export type SuiteAccountsCurrentDeviceClientRegistration = Readonly<{
159
159
  tokenEndpointAuthMethod: "none";
160
160
  }>;
161
161
 
162
+ function formatDeviceClientId<Id extends string>(
163
+ id: Id,
164
+ environment: SuiteAccountsRemoteEnvironment,
165
+ ): `hraness:${Id}:${SuiteAccountsRemoteEnvironment}:v1` {
166
+ return `hraness:${id}:${environment}:v1`;
167
+ }
168
+
162
169
  /**
163
170
  * Registration for a dedicated public device-authorization client. It has no
164
171
  * redirect URI, no client secret, and exactly one grant.
@@ -180,7 +187,7 @@ export function suiteAccountsCurrentDeviceClientRegistration(
180
187
  return null;
181
188
  }
182
189
  return deepFreeze({
183
- clientId: `hraness:${deviceClient}:${environment}:v1`,
190
+ clientId: formatDeviceClientId(deviceClient, environment),
184
191
  consumer: registration.consumer,
185
192
  grantTypes: [DEVICE_CODE_GRANT_TYPE],
186
193
  redirectUris: [],