@tempoxyz/auth 0.0.0-pr-109.sha-db45aa4 → 0.0.0-pr-117.sha-cf46870

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
@@ -1,6 +1,6 @@
1
1
  # @tempoxyz/auth
2
2
 
3
- Signs users in to Tempo through [Tempo Auth](../../docs/README.md), and returns their tokens for Tempo APIs and a [Viem](https://viem.sh) access key account on their Tempo Account.
3
+ Signs users in to Tempo through [Tempo ID](../../docs/README.md), and returns their tokens for Tempo APIs and a [Viem](https://viem.sh) access key account on their Tempo Account.
4
4
 
5
5
  ## Overview
6
6
 
@@ -53,4 +53,4 @@ pnpm add @tempoxyz/auth viem
53
53
  - [Guides](docs/guides/README.md): each sign-in flow, access keys, sessions, errors, and Viem.
54
54
  - [Viem](docs/guides/viem.md): `tempoAuth`, which extends a Viem client with the same actions as `client.auth`.
55
55
  - [API reference](docs/api/README.md): every action, function, and type.
56
- - [Tempo Auth](../../docs/README.md): the service the package calls, over HTTP.
56
+ - [Tempo ID](../../docs/README.md): the service the package calls, over HTTP.
package/dist/Actions.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Tempo Auth's actions. Each takes an instance from `Auth.create`. Each sign-in flow has its own
2
+ * Tempo ID's actions. Each takes an instance from `Auth.create`. Each sign-in flow has its own
3
3
  * namespace, `oauth` holds the standard OAuth endpoints for tokens an app holds, and the actions
4
4
  * every flow shares sit at the top level.
5
5
  * @module
@@ -19,14 +19,14 @@ export * as provider from './actions/provider.ts';
19
19
  export * as realm from './actions/realm.ts';
20
20
  export * as redirect from './actions/redirect.ts';
21
21
  /**
22
- * Authorizes the app for a user already signed in to Tempo Auth, from any app. Returns `undefined`
23
- * without a session, so the app shows sign-in. The key must fit Tempo Auth's headless ceiling. An
22
+ * Authorizes the app for a user already signed in to Tempo ID, from any app. Returns `undefined`
23
+ * without a session, so the app shows sign-in. The key must fit Tempo ID's headless ceiling. An
24
24
  * `account` that the call names becomes the app's account for its later requests, such as the
25
25
  * account the user selected in a sign-in's account step.
26
26
  *
27
27
  * A passkey-owned account signs the key with a passkey prompt on the page, when the page is the
28
28
  * app's own on Tempo's domain. Elsewhere the call throws a `RequestError` with reason
29
- * `webauthn_required`, and `Actions.redirect.start` authorizes the key on Tempo Auth's pages.
29
+ * `webauthn_required`, and `Actions.redirect.start` authorizes the key on Tempo ID's pages.
30
30
  *
31
31
  * @example
32
32
  * ```ts
@@ -50,7 +50,7 @@ export declare namespace authorize {
50
50
  account?: `0x${string}` | undefined;
51
51
  /**
52
52
  * A message the owner's signature binds, such as a sign-in challenge the app's backend issued.
53
- * Tempo Auth binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
53
+ * Tempo ID binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
54
54
  * `tempo-auth:sign` scope may send one.
55
55
  */
56
56
  challenge?: string | undefined;
@@ -84,7 +84,7 @@ export declare namespace refresh {
84
84
  };
85
85
  }
86
86
  /**
87
- * Ends the user's Tempo Auth session, which signs them out of every app that relies on it.
87
+ * Ends the user's Tempo ID session, which signs them out of every app that relies on it.
88
88
  *
89
89
  * @example
90
90
  * ```ts
package/dist/Actions.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Tempo Auth's actions. Each takes an instance from `Auth.create`. Each sign-in flow has its own
2
+ * Tempo ID's actions. Each takes an instance from `Auth.create`. Each sign-in flow has its own
3
3
  * namespace, `oauth` holds the standard OAuth endpoints for tokens an app holds, and the actions
4
4
  * every flow shares sit at the top level.
5
5
  * @module
@@ -18,14 +18,14 @@ export * as provider from './actions/provider.js';
18
18
  export * as realm from './actions/realm.js';
19
19
  export * as redirect from './actions/redirect.js';
20
20
  /**
21
- * Authorizes the app for a user already signed in to Tempo Auth, from any app. Returns `undefined`
22
- * without a session, so the app shows sign-in. The key must fit Tempo Auth's headless ceiling. An
21
+ * Authorizes the app for a user already signed in to Tempo ID, from any app. Returns `undefined`
22
+ * without a session, so the app shows sign-in. The key must fit Tempo ID's headless ceiling. An
23
23
  * `account` that the call names becomes the app's account for its later requests, such as the
24
24
  * account the user selected in a sign-in's account step.
25
25
  *
26
26
  * A passkey-owned account signs the key with a passkey prompt on the page, when the page is the
27
27
  * app's own on Tempo's domain. Elsewhere the call throws a `RequestError` with reason
28
- * `webauthn_required`, and `Actions.redirect.start` authorizes the key on Tempo Auth's pages.
28
+ * `webauthn_required`, and `Actions.redirect.start` authorizes the key on Tempo ID's pages.
29
29
  *
30
30
  * @example
31
31
  * ```ts
@@ -40,7 +40,7 @@ export async function authorize(auth, options = {}) {
40
40
  }));
41
41
  if (!session.user)
42
42
  return undefined;
43
- // A passkey sign-in's account step kept the key its assertion signed, which Tempo Auth
43
+ // A passkey sign-in's account step kept the key its assertion signed, which Tempo ID
44
44
  // authorizes with no second assertion when the passkey's account is chosen.
45
45
  const kept = options.accessKey
46
46
  ? undefined
@@ -89,7 +89,7 @@ export async function refresh(auth, options) {
89
89
  }));
90
90
  }
91
91
  /**
92
- * Ends the user's Tempo Auth session, which signs them out of every app that relies on it.
92
+ * Ends the user's Tempo ID session, which signs them out of every app that relies on it.
93
93
  *
94
94
  * @example
95
95
  * ```ts
@@ -97,6 +97,6 @@ export async function refresh(auth, options) {
97
97
  * ```
98
98
  */
99
99
  export async function signOut(auth) {
100
- // A JSON body keeps the request out of Tempo Auth's CSRF check for cross-site form posts.
100
+ // A JSON body keeps the request out of Tempo ID's CSRF check for cross-site form posts.
101
101
  await Api.json(await Api.post(auth, '/v1/auth/logout', { json: {} }));
102
102
  }
package/dist/Auth.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A Tempo Auth instance, which every action takes. Create one with {@link create}, then pass it
2
+ * A Tempo ID instance, which every action takes. Create one with {@link create}, then pass it
3
3
  * to each action in `Actions`. Every sign-in returns an `Authorization`: the user's tokens and a
4
4
  * Viem access key account.
5
5
  *
@@ -36,7 +36,7 @@ export type Account = ViemAccount.AccessKeyAccount & {
36
36
  /** What the account signs as, which only the `tempoAuth` extension reads. */
37
37
  readonly [AccountState.key]: AccountState.State;
38
38
  };
39
- /** A Tempo Auth instance, which every action takes. */
39
+ /** A Tempo ID instance, which every action takes. */
40
40
  export type Auth = {
41
41
  /** The chain the app's keys act on, unless an action's `permissions` names another. */
42
42
  chainId: number;
@@ -44,22 +44,22 @@ export type Auth = {
44
44
  clientId: string;
45
45
  /** The app's client secret. Only a backend holds one. */
46
46
  clientSecret?: string | undefined;
47
- /** Calls Tempo Auth. Defaults to the global `fetch`. */
47
+ /** Calls Tempo ID. Defaults to the global `fetch`. */
48
48
  fetch?: typeof globalThis.fetch | undefined;
49
- /** Where Tempo Auth redirects back to. Defaults to the page's origin in a browser. */
49
+ /** Where Tempo ID redirects back to. Defaults to the page's origin in a browser. */
50
50
  redirectUri?: string | undefined;
51
51
  /** The scopes the app's tokens carry. */
52
52
  scope: string;
53
53
  /**
54
- * Where `Actions.redirect.start` keeps its state until Tempo Auth redirects back, and
54
+ * Where `Actions.redirect.start` keeps its state until Tempo ID redirects back, and
55
55
  * `Actions.passkey.signIn` keeps a new key its email step signed. It must keep objects as they
56
56
  * are, since a browser key is a `CryptoKey`. Defaults to IndexedDB.
57
57
  */
58
58
  storage?: Storage | undefined;
59
- /** Where Tempo Auth runs, such as `https://auth.tempo.xyz`. */
59
+ /** Where Tempo ID runs, such as `https://auth.tempo.xyz`. */
60
60
  url: string;
61
61
  };
62
- /** A request Tempo Auth refused, with its status and message. */
62
+ /** A request Tempo ID refused, with its status and message. */
63
63
  export declare class RequestError extends Error {
64
64
  readonly name = "Auth.RequestError";
65
65
  /** The OAuth error code, such as `invalid_authorization_details`. */
@@ -70,7 +70,7 @@ export declare class RequestError extends Error {
70
70
  readonly meta: Readonly<Record<string, number | string>> | undefined;
71
71
  /** A stable name for the refusal, to branch on. */
72
72
  readonly reason: RequestError.Reason | undefined;
73
- /** The HTTP status of Tempo Auth's response. */
73
+ /** The HTTP status of Tempo ID's response. */
74
74
  readonly status: number;
75
75
  /** The page that explains the error. */
76
76
  readonly uri: string | undefined;
@@ -88,7 +88,7 @@ export declare namespace RequestError {
88
88
  meta?: Readonly<Record<string, number | string>> | undefined;
89
89
  /** A stable name for the refusal, to branch on. Absent from the issuer's own errors. */
90
90
  reason?: Reason | undefined;
91
- /** The HTTP status of Tempo Auth's response. */
91
+ /** The HTTP status of Tempo ID's response. */
92
92
  status: number;
93
93
  /** The page that explains the error, from `error_uri`. */
94
94
  uri?: string | undefined;
@@ -116,7 +116,7 @@ export declare class SignedOutError extends Error {
116
116
  */
117
117
  export declare function account(): Account;
118
118
  /**
119
- * Creates a Tempo Auth instance.
119
+ * Creates a Tempo ID instance.
120
120
  *
121
121
  * @example
122
122
  * ```ts
@@ -132,7 +132,7 @@ export declare namespace create {
132
132
  */
133
133
  chainId?: number | undefined;
134
134
  /**
135
- * Whether to use Tempo Auth's development deployment, `https://auth.tehq.dev`, with keys on
135
+ * Whether to use Tempo ID's development deployment, `https://auth.tehq.dev`, with keys on
136
136
  * Tempo testnet unless `chainId` names another chain. Defaults to `false`.
137
137
  */
138
138
  dev?: boolean | undefined;
@@ -141,7 +141,7 @@ export declare namespace create {
141
141
  * Defaults to `offline_access`, for a refresh token.
142
142
  */
143
143
  scope?: string | undefined;
144
- /** Where Tempo Auth runs. Defaults to `https://auth.tempo.xyz`, or `https://auth.tehq.dev` with `dev`. */
144
+ /** Where Tempo ID runs. Defaults to `https://auth.tempo.xyz`, or `https://auth.tehq.dev` with `dev`. */
145
145
  url?: string | undefined;
146
146
  };
147
147
  }
package/dist/Auth.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { tempo, tempoTestnet } from 'viem/tempo/chains';
2
2
  import * as AccountState from './internal/account.js';
3
- /** A request Tempo Auth refused, with its status and message. */
3
+ /** A request Tempo ID refused, with its status and message. */
4
4
  export class RequestError extends Error {
5
5
  name = 'Auth.RequestError';
6
6
  /** The OAuth error code, such as `invalid_authorization_details`. */
@@ -11,7 +11,7 @@ export class RequestError extends Error {
11
11
  meta;
12
12
  /** A stable name for the refusal, to branch on. */
13
13
  reason;
14
- /** The HTTP status of Tempo Auth's response. */
14
+ /** The HTTP status of Tempo ID's response. */
15
15
  status;
16
16
  /** The page that explains the error. */
17
17
  uri;
@@ -74,7 +74,7 @@ export function account() {
74
74
  return proxy;
75
75
  }
76
76
  /**
77
- * Creates a Tempo Auth instance.
77
+ * Creates a Tempo ID instance.
78
78
  *
79
79
  * @example
80
80
  * ```ts
@@ -92,7 +92,7 @@ export function create(options) {
92
92
  url: url ?? (dev ? urls.dev : urls.production),
93
93
  };
94
94
  }
95
- /** Where Tempo Auth runs unless `create` receives a `url`. */
95
+ /** Where Tempo ID runs unless `create` receives a `url`. */
96
96
  const urls = {
97
97
  dev: 'https://auth.tehq.dev',
98
98
  production: 'https://auth.tempo.xyz',
@@ -1,5 +1,5 @@
1
1
  /**
2
- * `tempoAuth`, a Viem client extension that adds Tempo Auth's actions as `client.auth`. It reads the
2
+ * `tempoAuth`, a Viem client extension that adds Tempo ID's actions as `client.auth`. It reads the
3
3
  * chain from the client, and sets the client's {@link Auth.Account} at each sign-in, so the client
4
4
  * sends with the signed-in user's access key.
5
5
  *
@@ -44,7 +44,7 @@ export declare class SupersededError extends Error {
44
44
  constructor();
45
45
  }
46
46
  /**
47
- * Returns a Viem client extension that adds Tempo Auth's actions as `client.auth`. Each member calls
47
+ * Returns a Viem client extension that adds Tempo ID's actions as `client.auth`. Each member calls
48
48
  * the action of the same name in `Actions` with one instance, whose `chainId` is the client's chain.
49
49
  * Each sign-in sets the client's account to the authorization's, and `signOut` empties it at once.
50
50
  * A sign-in that another sign-in or a sign-out overtook throws {@link SupersededError}. Throws
@@ -68,7 +68,7 @@ export declare namespace tempoAuth {
68
68
  * defaults to `chainId`, and an override names another chain.
69
69
  */
70
70
  type Decorator<chainId extends number> = {
71
- /** Tempo Auth's actions, with the extension's instance. */
71
+ /** Tempo ID's actions, with the extension's instance. */
72
72
  auth: {
73
73
  /** Actions for the user's Tempo Account. */
74
74
  account: {
@@ -126,7 +126,7 @@ export declare namespace tempoAuth {
126
126
  /** `Actions.realm.list`. */
127
127
  list: () => Promise<Actions.realm.list.ReturnType>;
128
128
  };
129
- /** Actions for sign-in through a redirect to Tempo Auth's pages. */
129
+ /** Actions for sign-in through a redirect to Tempo ID's pages. */
130
130
  redirect: {
131
131
  /** `Actions.redirect.complete`, which sets the client's account. */
132
132
  complete: (options?: Actions.redirect.complete.Options) => Promise<Actions.redirect.complete.ReturnType>;
package/dist/Decorator.js CHANGED
@@ -6,7 +6,7 @@ import * as Key from './Key.js';
6
6
  export class AccountRequiredError extends Error {
7
7
  name = 'Decorator.AccountRequiredError';
8
8
  constructor() {
9
- super('The client has no Tempo Auth account. Create the client with `account: Auth.account()`.');
9
+ super('The client has no Tempo ID account. Create the client with `account: Auth.account()`.');
10
10
  }
11
11
  }
12
12
  /** A client created without a chain, which the extension reads the instance's `chainId` from. */
@@ -27,7 +27,7 @@ export class SupersededError extends Error {
27
27
  }
28
28
  }
29
29
  /**
30
- * Returns a Viem client extension that adds Tempo Auth's actions as `client.auth`. Each member calls
30
+ * Returns a Viem client extension that adds Tempo ID's actions as `client.auth`. Each member calls
31
31
  * the action of the same name in `Actions` with one instance, whose `chainId` is the client's chain.
32
32
  * Each sign-in sets the client's account to the authorization's, and `signOut` empties it at once.
33
33
  * A sign-in that another sign-in or a sign-out overtook throws {@link SupersededError}. Throws
package/dist/Key.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * An app's access key on a user's Tempo Account, as the app stores it: the account it acts for,
3
- * the authorization Tempo Auth signed for it, and the key material the library generated.
3
+ * the authorization Tempo ID signed for it, and the key material the library generated.
4
4
  * @module
5
5
  */
6
6
  import { type Address, type Hex, type WebCryptoP256 } from 'ox';
package/dist/Key.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * An app's access key on a user's Tempo Account, as the app stores it: the account it acts for,
3
- * the authorization Tempo Auth signed for it, and the key material the library generated.
3
+ * the authorization Tempo ID signed for it, and the key material the library generated.
4
4
  * @module
5
5
  */
6
6
  import { PublicKey } from 'ox';
package/dist/Pending.d.ts CHANGED
@@ -1,14 +1,14 @@
1
1
  /**
2
- * A sign-in redirect in progress, which an app keeps until Tempo Auth redirects back.
2
+ * A sign-in redirect in progress, which an app keeps until Tempo ID redirects back.
3
3
  * @module
4
4
  */
5
5
  import type * as Key from './Key.ts';
6
6
  /**
7
- * A sign-in redirect in progress: what the app keeps until Tempo Auth redirects back, with the
7
+ * A sign-in redirect in progress: what the app keeps until Tempo ID redirects back, with the
8
8
  * material of the new access key the callback authorizes.
9
9
  */
10
10
  export type Pending = Key.Material & {
11
- /** Where Tempo Auth redirects back to, which the code exchange repeats. */
11
+ /** Where Tempo ID redirects back to, which the code exchange repeats. */
12
12
  redirectUri: string;
13
13
  /** The value the callback must echo, so a forged callback is refused. */
14
14
  state: string;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { KeyAuthorization } from 'ox/tempo';
6
6
  /**
7
- * What an app's access key may do, as Viem's `accessKey.authorize` takes it. Tempo Auth fills what
7
+ * What an app's access key may do, as Viem's `accessKey.authorize` takes it. Tempo ID fills what
8
8
  * it leaves out with the headless ceiling. `chainId` carries the chain's ID as a literal type, which
9
9
  * the authorization's `key.chainId` keeps.
10
10
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * The OAuth providers Tempo Auth can offer.
2
+ * The OAuth providers Tempo ID can offer.
3
3
  * @module
4
4
  */
5
5
  /** An OAuth provider's short name, as `Actions.provider.list` lists them. */
package/dist/Storage.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Where a redirect keeps its state until Tempo Auth redirects back.
2
+ * Where a redirect keeps its state until Tempo ID redirects back.
3
3
  * @module
4
4
  */
5
5
  /** Keeps a redirect's state, as structured-clone storage such as IndexedDB does. */
@@ -7,8 +7,8 @@ export type TempoAccount = {
7
7
  /** The account's address, the same on every Tempo chain. */
8
8
  address: `0x${string}`;
9
9
  /**
10
- * Who holds the account's owner key: a Privy wallet, which Tempo Auth signs with (`privy`), or a
11
- * passkey, which signs only on a Tempo Auth page (`webAuthn`). Treat another value as an owner
10
+ * Who holds the account's owner key: a Privy wallet, which Tempo ID signs with (`privy`), or a
11
+ * passkey, which signs only on a Tempo ID page (`webAuthn`). Treat another value as an owner
12
12
  * that may refuse a key authorization.
13
13
  */
14
14
  owner: 'privy' | 'webAuthn' | (string & {});
@@ -13,6 +13,6 @@ import * as Api from '../internal/api.js';
13
13
  */
14
14
  export async function get(auth) {
15
15
  const { tempo } = await Api.json(await (auth.fetch ?? fetch)(new URL(`/v1/account?${new URLSearchParams({ client_id: auth.clientId })}`, auth.url), { credentials: 'include' }));
16
- // Tempo Auth lists the account the app uses first, and always lists one.
16
+ // Tempo ID lists the account the app uses first, and always lists one.
17
17
  return Api.tempoAccount(tempo[0]);
18
18
  }
@@ -23,7 +23,7 @@ export declare namespace authorize {
23
23
  accessKey?: Account.Account | undefined;
24
24
  /**
25
25
  * A message the owner's signature binds, such as a sign-in challenge the app's backend issued.
26
- * Tempo Auth binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
26
+ * Tempo ID binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
27
27
  * `tempo-auth:sign` scope may send one.
28
28
  */
29
29
  challenge?: string | undefined;
@@ -64,7 +64,7 @@ export async function authorize(auth, options = {}) {
64
64
  };
65
65
  }
66
66
  /**
67
- * The machine's hostname, within the 64 characters Tempo Auth accepts. `getBuiltinModule` loads
67
+ * The machine's hostname, within the 64 characters Tempo ID accepts. `getBuiltinModule` loads
68
68
  * `node:os` without an import, which browser and React Native bundlers would fail to resolve.
69
69
  */
70
70
  function hostname() {
@@ -45,7 +45,7 @@ export declare namespace signIn {
45
45
  accessKey?: Account.Account | undefined;
46
46
  /**
47
47
  * A message the owner's signature binds, such as a sign-in challenge the app's backend issued.
48
- * Tempo Auth binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
48
+ * Tempo ID binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
49
49
  * `tempo-auth:sign` scope may send one.
50
50
  */
51
51
  challenge?: string | undefined;
@@ -28,7 +28,7 @@ export async function sendCode(auth, options) {
28
28
  */
29
29
  export async function signIn(auth, options) {
30
30
  const { challenge, code, email, link, permissions } = options;
31
- // A one-tap passkey sign-in's email step already signed the key it generated, which Tempo Auth
31
+ // A one-tap passkey sign-in's email step already signed the key it generated, which Tempo ID
32
32
  // returns once this request names it again. A key the app supplies replaces it.
33
33
  const kept = link && !options.accessKey ? await Link.get(auth, { link }) : undefined;
34
34
  const key = kept ?? (await AccessKey.resolve(options.accessKey));
@@ -44,7 +44,7 @@ export async function signIn(auth, options) {
44
44
  ...(link ? { link } : {}),
45
45
  },
46
46
  }));
47
- // A refusal throws above, which keeps the key for a retry with a new code. Tempo Auth already took
47
+ // A refusal throws above, which keeps the key for a retry with a new code. Tempo ID already took
48
48
  // the parked request. A failed removal keeps the stale key, which the next email step
49
49
  // replaces, rather than discard the authorization.
50
50
  if (kept && link)
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Calls Tempo Auth's standard OAuth endpoints for tokens an app already holds: introspection, the
2
+ * Calls Tempo ID's standard OAuth endpoints for tokens an app already holds: introspection, the
3
3
  * user's claims, and the signing keys that verify every token.
4
4
  * @module
5
5
  */
@@ -44,8 +44,8 @@ export declare namespace introspect {
44
44
  };
45
45
  }
46
46
  /**
47
- * Returns the issuer's JSON Web Key Set, whose keys verify every Tempo Auth token. An API caches
48
- * it, or passes Tempo Auth's `/oauth2/jwks` URL to a JWT library that caches it, such as jose's
47
+ * Returns the issuer's JSON Web Key Set, whose keys verify every Tempo ID token. An API caches
48
+ * it, or passes Tempo ID's `/oauth2/jwks` URL to a JWT library that caches it, such as jose's
49
49
  * `createRemoteJWKSet`.
50
50
  *
51
51
  * @example
@@ -34,8 +34,8 @@ export async function introspect(auth, options) {
34
34
  };
35
35
  }
36
36
  /**
37
- * Returns the issuer's JSON Web Key Set, whose keys verify every Tempo Auth token. An API caches
38
- * it, or passes Tempo Auth's `/oauth2/jwks` URL to a JWT library that caches it, such as jose's
37
+ * Returns the issuer's JSON Web Key Set, whose keys verify every Tempo ID token. An API caches
38
+ * it, or passes Tempo ID's `/oauth2/jwks` URL to a JWT library that caches it, such as jose's
39
39
  * `createRemoteJWKSet`.
40
40
  *
41
41
  * @example
@@ -23,7 +23,7 @@ import type { Step } from '../Step.ts';
23
23
  * instance's `storage`.
24
24
  *
25
25
  * Throws a `RequestError` with reason `webauthn_required` when another passkey owns the account.
26
- * That passkey signs only on Tempo Auth's pages, where `Actions.redirect.start` authorizes it for
26
+ * That passkey signs only on Tempo ID's pages, where `Actions.redirect.start` authorizes it for
27
27
  * the signed-in user.
28
28
  *
29
29
  * @example
@@ -42,7 +42,7 @@ export declare namespace signIn {
42
42
  accessKey?: Account.Account | undefined;
43
43
  /**
44
44
  * A message the owner's signature binds, such as a sign-in challenge the app's backend issued.
45
- * Tempo Auth binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
45
+ * Tempo ID binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
46
46
  * `tempo-auth:sign` scope may send one.
47
47
  */
48
48
  challenge?: string | undefined;
@@ -22,7 +22,7 @@ import { request } from '../internal/request.js';
22
22
  * instance's `storage`.
23
23
  *
24
24
  * Throws a `RequestError` with reason `webauthn_required` when another passkey owns the account.
25
- * That passkey signs only on Tempo Auth's pages, where `Actions.redirect.start` authorizes it for
25
+ * That passkey signs only on Tempo ID's pages, where `Actions.redirect.start` authorizes it for
26
26
  * the signed-in user.
27
27
  *
28
28
  * @example
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Signs the user in to Tempo Auth through an OAuth provider or an SSO connection, from the app's
2
+ * Signs the user in to Tempo ID through an OAuth provider or an SSO connection, from the app's
3
3
  * own sign-in buttons.
4
4
  * @module
5
5
  */
6
6
  import type { Auth } from '../Auth.ts';
7
7
  import type { Provider } from '../Provider.ts';
8
8
  /**
9
- * Lists the OAuth providers Tempo Auth offers, for an app that shows its own sign-in buttons.
9
+ * Lists the OAuth providers Tempo ID offers, for an app that shows its own sign-in buttons.
10
10
  *
11
11
  * @example
12
12
  * ```ts
@@ -25,7 +25,7 @@ export declare namespace list {
25
25
  }
26
26
  /**
27
27
  * Sends the browser to an OAuth provider, or to the SSO connection a `Step` names, and back to
28
- * `returnTo` signed in to Tempo Auth. Unlike `Actions.email.signIn`, it does not authorize the
28
+ * `returnTo` signed in to Tempo ID. Unlike `Actions.email.signIn`, it does not authorize the
29
29
  * app: the app calls `Actions.authorize` once the browser returns.
30
30
  *
31
31
  * @example
@@ -1,6 +1,6 @@
1
1
  import * as Api from '../internal/api.js';
2
2
  /**
3
- * Lists the OAuth providers Tempo Auth offers, for an app that shows its own sign-in buttons.
3
+ * Lists the OAuth providers Tempo ID offers, for an app that shows its own sign-in buttons.
4
4
  *
5
5
  * @example
6
6
  * ```ts
@@ -14,7 +14,7 @@ export async function list(auth) {
14
14
  }
15
15
  /**
16
16
  * Sends the browser to an OAuth provider, or to the SSO connection a `Step` names, and back to
17
- * `returnTo` signed in to Tempo Auth. Unlike `Actions.email.signIn`, it does not authorize the
17
+ * `returnTo` signed in to Tempo ID. Unlike `Actions.email.signIn`, it does not authorize the
18
18
  * app: the app calls `Actions.authorize` once the browser returns.
19
19
  *
20
20
  * @example
@@ -4,7 +4,7 @@ import type { Authorization } from '../Authorization.ts';
4
4
  import * as Pending from '../Pending.ts';
5
5
  import type { Permissions } from '../Permissions.ts';
6
6
  /**
7
- * Finishes a {@link start} when the page loads with Tempo Auth's callback, and returns `undefined`
7
+ * Finishes a {@link start} when the page loads with Tempo ID's callback, and returns `undefined`
8
8
  * otherwise. The code is redeemed once, however often the page calls this.
9
9
  *
10
10
  * @example
@@ -24,7 +24,7 @@ export declare namespace complete {
24
24
  type ReturnType = Authorization | undefined;
25
25
  }
26
26
  /**
27
- * Returns the URL that signs the user in on Tempo Auth's pages and redirects back with a code,
27
+ * Returns the URL that signs the user in on Tempo ID's pages and redirects back with a code,
28
28
  * and the `Pending` state to keep until then, such as in a sealed cookie.
29
29
  * {@link handleCallback} redeems the code for the tokens and the key authorization.
30
30
  *
@@ -47,13 +47,13 @@ export declare namespace createUrl {
47
47
  accessKey?: Account.Account | undefined;
48
48
  /**
49
49
  * A message the owner's signature binds, such as a sign-in challenge the app's backend issued.
50
- * Tempo Auth binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
50
+ * Tempo ID binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
51
51
  * `tempo-auth:sign` scope may send one.
52
52
  */
53
53
  challenge?: string | undefined;
54
- /** What the key may do. Tempo Auth's pages show it, and the headless ceiling fills what it leaves out. */
54
+ /** What the key may do. Tempo ID's pages show it, and the headless ceiling fills what it leaves out. */
55
55
  permissions?: Permissions | undefined;
56
- /** Where Tempo Auth redirects back to. Defaults to the instance's `redirectUri`. */
56
+ /** Where Tempo ID redirects back to. Defaults to the instance's `redirectUri`. */
57
57
  redirectUri?: string | undefined;
58
58
  };
59
59
  type ReturnType = {
@@ -82,12 +82,12 @@ export declare namespace handleCallback {
82
82
  accessKey?: Account.Account | undefined;
83
83
  /** What `createUrl` returned to keep. */
84
84
  pending: Pending.Pending;
85
- /** The callback URL Tempo Auth redirected to. */
85
+ /** The callback URL Tempo ID redirected to. */
86
86
  url: string | URL;
87
87
  };
88
88
  }
89
89
  /**
90
- * Sends the browser to Tempo Auth's pages to sign in, keeping the redirect's state in `storage`.
90
+ * Sends the browser to Tempo ID's pages to sign in, keeping the redirect's state in `storage`.
91
91
  * {@link complete} finishes it when the browser returns.
92
92
  *
93
93
  * @example
@@ -105,11 +105,11 @@ export declare namespace start {
105
105
  accessKey?: Account.Account | undefined;
106
106
  /**
107
107
  * A message the owner's signature binds, such as a sign-in challenge the app's backend issued.
108
- * Tempo Auth binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
108
+ * Tempo ID binds its EIP-191 hash as the key authorization's `witness`. Only an app with the
109
109
  * `tempo-auth:sign` scope may send one.
110
110
  */
111
111
  challenge?: string | undefined;
112
- /** What the key may do. Tempo Auth's pages show it, and the headless ceiling fills what it leaves out. */
112
+ /** What the key may do. Tempo ID's pages show it, and the headless ceiling fills what it leaves out. */
113
113
  permissions?: Permissions | undefined;
114
114
  };
115
115
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Signs the user in on Tempo Auth's pages, which redirect back with a code. `start` and `complete`
2
+ * Signs the user in on Tempo ID's pages, which redirect back with a code. `start` and `complete`
3
3
  * keep the redirect's state in `storage` for a browser app. `createUrl` and `handleCallback` leave
4
4
  * it to the app to keep, for a backend or a native app.
5
5
  * @module
@@ -12,7 +12,7 @@ import { request } from '../internal/request.js';
12
12
  import * as Store from '../internal/store.js';
13
13
  import * as Pending from '../Pending.js';
14
14
  /**
15
- * Finishes a {@link start} when the page loads with Tempo Auth's callback, and returns `undefined`
15
+ * Finishes a {@link start} when the page loads with Tempo ID's callback, and returns `undefined`
16
16
  * otherwise. The code is redeemed once, however often the page calls this.
17
17
  *
18
18
  * @example
@@ -46,7 +46,7 @@ export function complete(auth, options = {}) {
46
46
  return completed;
47
47
  }
48
48
  /**
49
- * Returns the URL that signs the user in on Tempo Auth's pages and redirects back with a code,
49
+ * Returns the URL that signs the user in on Tempo ID's pages and redirects back with a code,
50
50
  * and the `Pending` state to keep until then, such as in a sealed cookie.
51
51
  * {@link handleCallback} redeems the code for the tokens and the key authorization.
52
52
  *
@@ -138,7 +138,7 @@ export async function handleCallback(auth, options) {
138
138
  }, { accessKey: options.accessKey, material });
139
139
  }
140
140
  /**
141
- * Sends the browser to Tempo Auth's pages to sign in, keeping the redirect's state in `storage`.
141
+ * Sends the browser to Tempo ID's pages to sign in, keeping the redirect's state in `storage`.
142
142
  * {@link complete} finishes it when the browser returns.
143
143
  *
144
144
  * @example
@@ -6,7 +6,7 @@ import * as Key from '../Key.ts';
6
6
  import type { TempoAccount } from '../TempoAccount.ts';
7
7
  import type { Tokens } from '../Tokens.ts';
8
8
  /**
9
- * Builds an authorization from what Tempo Auth returned and the sign-in's key: the material the
9
+ * Builds an authorization from what Tempo ID returned and the sign-in's key: the material the
10
10
  * library generated, or the `accessKey` the app supplied. `chainId` is the chain the request named,
11
11
  * which the key authorization repeats.
12
12
  */
@@ -35,7 +35,7 @@ export type Headless = {
35
35
  };
36
36
  /** Reads a JSON response, and throws a {@link RequestError} for a refused request. */
37
37
  export declare function json<value = unknown>(response: Response): Promise<value>;
38
- /** An OAuth error response, with Tempo Auth's extension members. */
38
+ /** An OAuth error response, with Tempo ID's extension members. */
39
39
  export type ErrorBody = {
40
40
  /** The OAuth error code, which `reason` determines. */
41
41
  error: string;
@@ -54,12 +54,12 @@ export type ErrorBody = {
54
54
  export declare function error(body: Partial<ErrorBody>, options: {
55
55
  status: number;
56
56
  }): RequestError;
57
- /** Posts JSON to Tempo Auth's API with the session cookie. */
57
+ /** Posts JSON to Tempo ID's API with the session cookie. */
58
58
  export declare function post(auth: Auth, path: string, options: {
59
59
  json: unknown;
60
60
  }): Promise<Response>;
61
61
  /**
62
- * Calls Tempo Auth's OAuth token endpoint, adding the client and any secret. It forwards standard
62
+ * Calls Tempo ID's OAuth token endpoint, adding the client and any secret. It forwards standard
63
63
  * OAuth form posts to WorkOS.
64
64
  */
65
65
  export declare function token(auth: Auth, body: Record<string, string>): Promise<TokenResponse>;
@@ -86,7 +86,7 @@ export type TempoAccountResponse = {
86
86
  name: string;
87
87
  };
88
88
  };
89
- /** What Tempo Auth's token endpoint returns. Redeeming a redirect's code adds its key authorization. */
89
+ /** What Tempo ID's token endpoint returns. Redeeming a redirect's code adds its key authorization. */
90
90
  export type TokenResponse = {
91
91
  /** The access token, which authorizes the app's requests to its APIs. */
92
92
  access_token: string;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Calls Tempo Auth's API, and reads its responses into what the actions return.
2
+ * Calls Tempo ID's API, and reads its responses into what the actions return.
3
3
  * @module
4
4
  */
5
5
  import { Base64 } from 'ox';
6
6
  import { RequestError } from '../Auth.js';
7
7
  import * as Key from '../Key.js';
8
8
  /**
9
- * Builds an authorization from what Tempo Auth returned and the sign-in's key: the material the
9
+ * Builds an authorization from what Tempo ID returned and the sign-in's key: the material the
10
10
  * library generated, or the `accessKey` the app supplied. `chainId` is the chain the request named,
11
11
  * which the key authorization repeats.
12
12
  */
@@ -48,7 +48,7 @@ export function error(body, options) {
48
48
  uri: body.error_uri,
49
49
  });
50
50
  }
51
- /** Posts JSON to Tempo Auth's API with the session cookie. */
51
+ /** Posts JSON to Tempo ID's API with the session cookie. */
52
52
  export function post(auth, path, options) {
53
53
  return (auth.fetch ?? fetch)(new URL(path, auth.url), {
54
54
  body: JSON.stringify(options.json),
@@ -58,7 +58,7 @@ export function post(auth, path, options) {
58
58
  });
59
59
  }
60
60
  /**
61
- * Calls Tempo Auth's OAuth token endpoint, adding the client and any secret. It forwards standard
61
+ * Calls Tempo ID's OAuth token endpoint, adding the client and any secret. It forwards standard
62
62
  * OAuth form posts to WorkOS.
63
63
  */
64
64
  export async function token(auth, body) {
@@ -2,8 +2,8 @@ import type { Account } from 'viem/tempo';
2
2
  import type { Auth } from '../Auth.ts';
3
3
  import type { Permissions } from '../Permissions.ts';
4
4
  /**
5
- * The authorization request and key authorization request, in Tempo Auth's wire format. An access
6
- * key account names its Tempo Account through `access`, and a plain key leaves it to Tempo Auth.
5
+ * The authorization request and key authorization request, in Tempo ID's wire format. An access
6
+ * key account names its Tempo Account through `access`, and a plain key leaves it to Tempo ID.
7
7
  */
8
8
  export declare function request(auth: Auth, options: {
9
9
  accessKey: Account.Account;
@@ -1,12 +1,12 @@
1
1
  /**
2
- * Builds the authorization and key authorization requests the actions send, in Tempo Auth's wire
3
- * format. The root type check holds them to Tempo Auth's routes.
2
+ * Builds the authorization and key authorization requests the actions send, in Tempo ID's wire
3
+ * format. The root type check holds them to Tempo ID's routes.
4
4
  * @module
5
5
  */
6
6
  import { Hex } from 'ox';
7
7
  /**
8
- * The authorization request and key authorization request, in Tempo Auth's wire format. An access
9
- * key account names its Tempo Account through `access`, and a plain key leaves it to Tempo Auth.
8
+ * The authorization request and key authorization request, in Tempo ID's wire format. An access
9
+ * key account names its Tempo Account through `access`, and a plain key leaves it to Tempo ID.
10
10
  */
11
11
  export function request(auth, options) {
12
12
  const { accessKey, challenge, permissions = {} } = options;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tempoxyz/auth",
3
- "version": "0.0.0-pr-109.sha-db45aa4",
4
- "description": "Signs users in to Tempo through Tempo Auth, and returns Viem access key accounts on their Tempo Accounts.",
3
+ "version": "0.0.0-pr-117.sha-cf46870",
4
+ "description": "Signs users in to Tempo through Tempo ID, and returns Viem access key accounts on their Tempo Accounts.",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {