@tempoxyz/auth 0.0.0-pr-75.sha-dddbed0 → 0.0.0-pr-74.sha-16dc984
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.
|
@@ -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 IDs, the browser offers. Defaults to every passkey it holds for Tempo's domain. */
|
|
46
|
-
credentialId?: string | readonly 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. */
|
|
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
|
};
|
package/dist/actions/passkey.js
CHANGED
|
@@ -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,
|
|
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 ? { 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-
|
|
3
|
+
"version": "0.0.0-pr-74.sha-16dc984",
|
|
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": {
|