@tempoxyz/auth 0.0.0-pr-75.sha-41a6ef0 → 0.0.0-pr-74.sha-4682ce2

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.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Signs the user in with a passkey from the app's own sign-in form, and signs the app's key with the
3
- * same assertion. By default the browser offers every passkey it holds for Tempo's domain, so the
4
- * app needs no email first. `credentialId` narrows that to the passkeys it names.
3
+ * same assertion. The browser offers every passkey it holds for Tempo's domain, so the app needs no
4
+ * email first.
5
5
  * @module
6
6
  */
7
7
  import { Authentication } from 'ox/webauthn';
@@ -42,16 +42,12 @@ export declare namespace signIn {
42
42
  * `tempo-auth:sign` scope may send one.
43
43
  */
44
44
  challenge?: string | undefined;
45
- /** The credential ID, or up to 16 IDs, the browser offers. Defaults to every passkey it holds for Tempo's domain, as an empty list does. */
46
- credentialId?: readonly string[] | string | undefined;
47
45
  /**
48
46
  * Runs the WebAuthn ceremony in place of `navigator.credentials.get`, such as a native passkey
49
47
  * module. Its assertion must report a web origin on the relying party's domain that the app
50
48
  * registered, so an Android app's facet origin is refused.
51
49
  */
52
50
  getFn?: Authentication.sign.Options['getFn'] | undefined;
53
- /** How the browser mediates the ceremony, such as `conditional` for passkey autofill. Defaults to the browser's own mediation. */
54
- mediation?: 'conditional' | 'optional' | 'required' | 'silent' | undefined;
55
51
  /** What the key may do. It must fit the headless ceiling, which fills what it leaves out. */
56
52
  permissions?: Permissions<chainId> | undefined;
57
53
  };
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Signs the user in with a passkey from the app's own sign-in form, and signs the app's key with the
3
- * same assertion. By default the browser offers every passkey it holds for Tempo's domain, so the
4
- * app needs no email first. `credentialId` narrows that to the passkeys it names.
3
+ * same assertion. The browser offers every passkey it holds for Tempo's domain, so the app needs no
4
+ * email first.
5
5
  * @module
6
6
  */
7
7
  import { Authentication } from 'ox/webauthn';
@@ -29,7 +29,7 @@ import { request } from '../internal/request.js';
29
29
  * ```
30
30
  */
31
31
  export async function signIn(auth, options = {}) {
32
- const { challenge, credentialId, getFn, mediation, permissions } = options;
32
+ const { challenge, getFn, permissions } = options;
33
33
  const key = await AccessKey.resolve(options.accessKey);
34
34
  const authorize = request(auth, {
35
35
  accessKey: key.accessKey,
@@ -40,11 +40,7 @@ export async function signIn(auth, options = {}) {
40
40
  // sends no `Origin` to bind one-tap to, so it sends the request with the assertion instead.
41
41
  const native = !/^https?:/i.test(authorize.redirect_uri);
42
42
  const requested = await Api.json(await Api.post(auth, '/v1/auth/passkey/options', {
43
- json: {
44
- ...(native ? {} : { authorize }),
45
- ...(credentialId === undefined ? {} : { credentialId }),
46
- ...(mediation === undefined ? {} : { mediation }),
47
- },
43
+ json: native ? {} : { authorize },
48
44
  }));
49
45
  const deserialized = Authentication.deserializeOptions(requested.options);
50
46
  const assertion = Authentication.serializeResponse(await Authentication.sign(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tempoxyz/auth",
3
- "version": "0.0.0-pr-75.sha-41a6ef0",
3
+ "version": "0.0.0-pr-74.sha-4682ce2",
4
4
  "description": "Signs users in to Tempo through Tempo Auth, and returns Viem access key accounts on their Tempo Accounts.",
5
5
  "type": "module",
6
6
  "exports": {