@oxyhq/services 21.0.0 → 21.0.1
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/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialog.js +48 -4
- package/lib/commonjs/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +69 -1
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/passkeyFlow.js +117 -0
- package/lib/commonjs/ui/context/passkeyFlow.js.map +1 -0
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +18 -2
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAuthMethods.js +49 -0
- package/lib/commonjs/ui/hooks/queries/useAuthMethods.js.map +1 -0
- package/lib/commonjs/webauthn/passkeyClient.js +39 -0
- package/lib/commonjs/webauthn/passkeyClient.js.map +1 -0
- package/lib/commonjs/webauthn/passkeyClient.native.js +34 -0
- package/lib/commonjs/webauthn/passkeyClient.native.js.map +1 -0
- package/lib/commonjs/webauthn/passkeyClient.web.js +57 -0
- package/lib/commonjs/webauthn/passkeyClient.web.js.map +1 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialog.js +48 -4
- package/lib/module/ui/components/OxyAccountDialog.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +69 -1
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/passkeyFlow.js +110 -0
- package/lib/module/ui/context/passkeyFlow.js.map +1 -0
- package/lib/module/ui/hooks/queries/queryKeys.js +15 -0
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAuthMethods.js +45 -0
- package/lib/module/ui/hooks/queries/useAuthMethods.js.map +1 -0
- package/lib/module/webauthn/passkeyClient.js +33 -0
- package/lib/module/webauthn/passkeyClient.js.map +1 -0
- package/lib/module/webauthn/passkeyClient.native.js +28 -0
- package/lib/module/webauthn/passkeyClient.native.js.map +1 -0
- package/lib/module/webauthn/passkeyClient.web.js +52 -0
- package/lib/module/webauthn/passkeyClient.web.js.map +1 -0
- package/lib/typescript/commonjs/index.d.ts +2 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +26 -0
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +85 -0
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts +212 -0
- package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts.map +1 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts +20 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts.map +1 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts +15 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts +36 -0
- package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts.map +1 -0
- package/lib/typescript/module/index.d.ts +2 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialog.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +26 -0
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts +85 -0
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +9 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts +212 -0
- package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts.map +1 -0
- package/lib/typescript/module/webauthn/passkeyClient.d.ts +20 -0
- package/lib/typescript/module/webauthn/passkeyClient.d.ts.map +1 -0
- package/lib/typescript/module/webauthn/passkeyClient.native.d.ts +15 -0
- package/lib/typescript/module/webauthn/passkeyClient.native.d.ts.map +1 -0
- package/lib/typescript/module/webauthn/passkeyClient.web.d.ts +36 -0
- package/lib/typescript/module/webauthn/passkeyClient.web.d.ts.map +1 -0
- package/package.json +4 -3
- package/src/index.ts +2 -0
- package/src/ui/components/OxyAccountDialog.tsx +57 -0
- package/src/ui/context/OxyContext.tsx +76 -0
- package/src/ui/context/__tests__/passkeyFlow.test.ts +237 -0
- package/src/ui/context/oxyContextTypes.ts +21 -0
- package/src/ui/context/passkeyFlow.ts +146 -0
- package/src/ui/hooks/queries/queryKeys.ts +14 -0
- package/src/ui/hooks/queries/useAuthMethods.ts +45 -0
- package/src/webauthn/passkeyClient.native.ts +26 -0
- package/src/webauthn/passkeyClient.ts +31 -0
- package/src/webauthn/passkeyClient.web.ts +56 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Passkey / WebAuthn ceremony client — clean default (non-web) implementation.
|
|
5
|
+
*
|
|
6
|
+
* This is the base module TypeScript resolves for TYPES and any bundler that
|
|
7
|
+
* does not pick a platform variant. It intentionally imports NOTHING browser-
|
|
8
|
+
* specific (no `@simplewebauthn/browser`) so it stays safe for Metro, native
|
|
9
|
+
* builds, and SSR. The real ceremony lives in `passkeyClient.web.ts`; native
|
|
10
|
+
* passkeys are Commons' job, so there is no WebAuthn ceremony here.
|
|
11
|
+
*
|
|
12
|
+
* `isPasskeySupported()` returns `false` (no relying-party origin / no browser
|
|
13
|
+
* WebAuthn API), and the ceremony helpers throw a clear error so a caller that
|
|
14
|
+
* skipped the support gate fails loudly instead of silently.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const WEBAUTHN_WEB_ONLY_MESSAGE = 'WebAuthn is web-only; native uses Commons. Passkeys are not available on this platform.';
|
|
18
|
+
|
|
19
|
+
/** Always `false` off the web — there is no relying-party origin or WebAuthn API. */
|
|
20
|
+
export function isPasskeySupported() {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Not available off the web — throws. Guard with {@link isPasskeySupported} first. */
|
|
25
|
+
export async function runRegistrationCeremony(_optionsJSON) {
|
|
26
|
+
throw new Error(WEBAUTHN_WEB_ONLY_MESSAGE);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Not available off the web — throws. Guard with {@link isPasskeySupported} first. */
|
|
30
|
+
export async function runAuthenticationCeremony(_optionsJSON) {
|
|
31
|
+
throw new Error(WEBAUTHN_WEB_ONLY_MESSAGE);
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=passkeyClient.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WEBAUTHN_WEB_ONLY_MESSAGE","isPasskeySupported","runRegistrationCeremony","_optionsJSON","Error","runAuthenticationCeremony"],"sourceRoot":"../../../src","sources":["webauthn/passkeyClient.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,yBAAyB,GAC7B,yFAAyF;;AAE3F;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAAY;EAC5C,OAAO,KAAK;AACd;;AAEA;AACA,OAAO,eAAeC,uBAAuBA,CAACC,YAAqB,EAAoB;EACrF,MAAM,IAAIC,KAAK,CAACJ,yBAAyB,CAAC;AAC5C;;AAEA;AACA,OAAO,eAAeK,yBAAyBA,CAACF,YAAqB,EAAoB;EACvF,MAAM,IAAIC,KAAK,CAACJ,yBAAyB,CAAC;AAC5C","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Passkey / WebAuthn ceremony client — NATIVE implementation.
|
|
5
|
+
*
|
|
6
|
+
* React Native has no browser WebAuthn API, and Oxy's native passkey story is
|
|
7
|
+
* Commons (shared-keychain / QR handoff), NOT `navigator.credentials`. So this
|
|
8
|
+
* variant imports NOTHING browser-specific and mirrors the clean default:
|
|
9
|
+
* unsupported, and the ceremony helpers throw if a caller skipped the gate.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const WEBAUTHN_WEB_ONLY_MESSAGE = 'WebAuthn is web-only; native uses Commons. Passkeys are not available on this platform.';
|
|
13
|
+
|
|
14
|
+
/** Always `false` on native — there is no browser WebAuthn API. */
|
|
15
|
+
export function isPasskeySupported() {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Not available on native — throws. Guard with {@link isPasskeySupported} first. */
|
|
20
|
+
export async function runRegistrationCeremony(_optionsJSON) {
|
|
21
|
+
throw new Error(WEBAUTHN_WEB_ONLY_MESSAGE);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Not available on native — throws. Guard with {@link isPasskeySupported} first. */
|
|
25
|
+
export async function runAuthenticationCeremony(_optionsJSON) {
|
|
26
|
+
throw new Error(WEBAUTHN_WEB_ONLY_MESSAGE);
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=passkeyClient.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["WEBAUTHN_WEB_ONLY_MESSAGE","isPasskeySupported","runRegistrationCeremony","_optionsJSON","Error","runAuthenticationCeremony"],"sourceRoot":"../../../src","sources":["webauthn/passkeyClient.native.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,MAAMA,yBAAyB,GAC7B,yFAAyF;;AAE3F;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAAY;EAC5C,OAAO,KAAK;AACd;;AAEA;AACA,OAAO,eAAeC,uBAAuBA,CAACC,YAAqB,EAAoB;EACrF,MAAM,IAAIC,KAAK,CAACJ,yBAAyB,CAAC;AAC5C;;AAEA;AACA,OAAO,eAAeK,yBAAyBA,CAACF,YAAqB,EAAoB;EACvF,MAAM,IAAIC,KAAK,CAACJ,yBAAyB,CAAC;AAC5C","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Passkey / WebAuthn ceremony client — WEB implementation.
|
|
5
|
+
*
|
|
6
|
+
* The browser half of the passkey flow: it drives `navigator.credentials`
|
|
7
|
+
* through `@simplewebauthn/browser`, turning the OPAQUE options the server
|
|
8
|
+
* emitted (`OxyServices.webauthn{Register,Login}Options`) into the opaque
|
|
9
|
+
* response the matching `verify` endpoint consumes. Oxy never owns those wire
|
|
10
|
+
* shapes — `@simplewebauthn/browser` does — so options flow in as `unknown` and
|
|
11
|
+
* the single cast at this boundary hands them to the library's own types.
|
|
12
|
+
*
|
|
13
|
+
* This file is selected ONLY on web (react-native-web / Vite RNW): the sibling
|
|
14
|
+
* `passkeyClient.native.ts` + the clean default `passkeyClient.ts` deliberately
|
|
15
|
+
* do NOT import `@simplewebauthn/browser` (a browser-only dependency), per the
|
|
16
|
+
* platform-split rule. Native passkeys are Commons' job — there is no WebAuthn
|
|
17
|
+
* ceremony off the web.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { startRegistration, startAuthentication } from '@simplewebauthn/browser';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* True iff this browser can run a WebAuthn ceremony (exposes the
|
|
24
|
+
* `PublicKeyCredential` global). Gate all passkey UI/entrypoints on this so an
|
|
25
|
+
* unsupported browser fails loudly rather than throwing mid-ceremony.
|
|
26
|
+
*/
|
|
27
|
+
export function isPasskeySupported() {
|
|
28
|
+
return typeof window !== 'undefined' && typeof window.PublicKeyCredential !== 'undefined';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Run the WebAuthn REGISTRATION ceremony (`navigator.credentials.create`) from
|
|
33
|
+
* the server's opaque creation options, returning the opaque attestation
|
|
34
|
+
* response for `OxyServices.webauthnRegisterVerify`.
|
|
35
|
+
*/
|
|
36
|
+
export async function runRegistrationCeremony(optionsJSON) {
|
|
37
|
+
return startRegistration({
|
|
38
|
+
optionsJSON: optionsJSON
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Run the WebAuthn AUTHENTICATION ceremony (`navigator.credentials.get`) from
|
|
44
|
+
* the server's opaque request options, returning the opaque assertion response
|
|
45
|
+
* for `OxyServices.webauthnLoginVerify`.
|
|
46
|
+
*/
|
|
47
|
+
export async function runAuthenticationCeremony(optionsJSON) {
|
|
48
|
+
return startAuthentication({
|
|
49
|
+
optionsJSON: optionsJSON
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=passkeyClient.web.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["startRegistration","startAuthentication","isPasskeySupported","window","PublicKeyCredential","runRegistrationCeremony","optionsJSON","runAuthenticationCeremony"],"sourceRoot":"../../../src","sources":["webauthn/passkeyClient.web.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACEA,iBAAiB,EACjBC,mBAAmB,QAKd,yBAAyB;;AAEhC;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,kBAAkBA,CAAA,EAAY;EAC5C,OAAO,OAAOC,MAAM,KAAK,WAAW,IAAI,OAAOA,MAAM,CAACC,mBAAmB,KAAK,WAAW;AAC3F;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,uBAAuBA,CAC3CC,WAAoB,EACe;EACnC,OAAON,iBAAiB,CAAC;IAAEM,WAAW,EAAEA;EAAsD,CAAC,CAAC;AAClG;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAeC,yBAAyBA,CAC7CD,WAAoB,EACiB;EACrC,OAAOL,mBAAmB,CAAC;IAAEK,WAAW,EAAEA;EAAqD,CAAC,CAAC;AACnG","ignoreList":[]}
|
|
@@ -37,6 +37,7 @@ export type { UseStorageOptions, UseStorageResult } from './ui/hooks/useStorage'
|
|
|
37
37
|
export { useUserProfile, useUserProfiles, useCurrentUser, useUserById, useUserByUsername, useUsersBySessions, usePrivacySettings, useConnectedApps, } from './ui/hooks/queries/useAccountQueries';
|
|
38
38
|
export { useSessions, useSession, useDeviceSessions, useUserDevices, useSecurityInfo, useAccountStorageUsage, } from './ui/hooks/queries/useServicesQueries';
|
|
39
39
|
export { useSecurityActivity, useRecentSecurityActivity, useInfiniteSecurityActivity, } from './ui/hooks/queries/useSecurityQueries';
|
|
40
|
+
export { useAuthMethods } from './ui/hooks/queries/useAuthMethods';
|
|
40
41
|
export { useUserSubscription, useUserPayments, useUserWallet, useUserWalletTransactions, } from './ui/hooks/queries/usePaymentQueries';
|
|
41
42
|
export type { Subscription, SubscriptionPlan, SubscriptionStatus, SubscriptionFeatures, Payment, Wallet, WalletTransaction, WalletTransactionType, WalletTransactionStatus, WalletPagination, WalletTransactionsResponse, } from './ui/hooks/queries/paymentTypes';
|
|
42
43
|
export { useUpdateProfile, useUploadAvatar, useUpdateAccountSettings, useUpdatePrivacySettings, useUpdateNotificationPreferences, useUpdateUserPreferences, useRevokeConnectedApp, useUploadFile, } from './ui/hooks/mutations/useAccountMutations';
|
|
@@ -44,7 +45,7 @@ export { useSwitchSession, useLogoutSession, useLogoutAll, useUpdateDeviceName,
|
|
|
44
45
|
export { createProfileMutation, createGenericMutation, } from './ui/hooks/mutations/mutationFactory';
|
|
45
46
|
export type { ProfileMutationConfig, GenericMutationConfig, } from './ui/hooks/mutations/mutationFactory';
|
|
46
47
|
export { mutationKeys } from './ui/hooks/mutations/mutationKeys';
|
|
47
|
-
export { queryKeys, invalidateAccountQueries, invalidateUserQueries, invalidateSessionQueries, invalidateDeviceQueries, invalidatePrivacyQueries, invalidateSecurityQueries, invalidateStorageQueries, invalidatePaymentsQueries, invalidateConnectedAppsQueries, } from './ui/hooks/queries/queryKeys';
|
|
48
|
+
export { queryKeys, invalidateAccountQueries, invalidateUserQueries, invalidateSessionQueries, invalidateDeviceQueries, invalidatePrivacyQueries, invalidateSecurityQueries, invalidateStorageQueries, invalidatePaymentsQueries, invalidateConnectedAppsQueries, invalidateAuthMethodsQueries, } from './ui/hooks/queries/queryKeys';
|
|
48
49
|
export { useMutationStatus } from './ui/hooks/useMutationStatus';
|
|
49
50
|
export type { MutationStatus } from './ui/hooks/useMutationStatus';
|
|
50
51
|
export { useOnlineStatus } from './ui/hooks/useOnlineStatus';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAYH,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACjD,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,M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ClF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAGlF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAKtF,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AACvF,YAAY,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAMxD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,sCAAsC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyAccountDialog.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/OxyAccountDialog.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgE/B;;;GAGG;AACH,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAyJ7B,CAAC;AAugBF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2D/B,OAAO,KAAK,EACV,eAAe,EAEf,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"OxyContext.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/OxyContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA2D/B,OAAO,KAAK,EACV,eAAe,EAEf,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AAY3B,YAAY,EAAE,eAAe,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAIxG,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAm8BzD,CAAC;AAEF,eAAO,MAAM,kBAAkB,mCAAc,CAAC;AAoE9C,eAAO,MAAM,MAAM,QAAO,eAMzB,CAAC"}
|
|
@@ -49,6 +49,32 @@ export interface OxyContextState {
|
|
|
49
49
|
}) => Promise<{
|
|
50
50
|
securityAlert?: SecurityAlert;
|
|
51
51
|
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Sign in with a passkey (WebAuthn). Usernameless / discoverable-credential
|
|
54
|
+
* flow: the browser prompts for any resident Oxy passkey. WEB-ONLY — throws on
|
|
55
|
+
* native or an unsupported browser (native passkeys are Commons' job). On
|
|
56
|
+
* `useOxy()`, NOT re-exposed on `useAuth()`.
|
|
57
|
+
*/
|
|
58
|
+
signInWithPasskey: (opts?: {
|
|
59
|
+
deviceName?: string;
|
|
60
|
+
deviceFingerprint?: string;
|
|
61
|
+
}) => Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Create a brand-new account whose first authentication method is a passkey.
|
|
64
|
+
* WEB-ONLY — throws on native or an unsupported browser.
|
|
65
|
+
*/
|
|
66
|
+
registerWithPasskey: (params: {
|
|
67
|
+
username: string;
|
|
68
|
+
deviceName?: string;
|
|
69
|
+
}) => Promise<void>;
|
|
70
|
+
/**
|
|
71
|
+
* Add a passkey to the already-signed-in account (bearer present). Does NOT
|
|
72
|
+
* commit a new session; refreshes the linked auth-methods list on success.
|
|
73
|
+
* WEB-ONLY — throws on native or an unsupported browser.
|
|
74
|
+
*/
|
|
75
|
+
addPasskey: (params?: {
|
|
76
|
+
deviceName?: string;
|
|
77
|
+
}) => Promise<void>;
|
|
52
78
|
revokeSuspiciousSignIn: () => Promise<void>;
|
|
53
79
|
handleWebSession: (session: SessionLoginResponse) => Promise<void>;
|
|
54
80
|
logout: (targetSessionId?: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oxyContextTypes.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/oxyContextTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAChM,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAA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AE,cAAc,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;IACpB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAED,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3D"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure passkey (WebAuthn) sign-in / registration orchestration.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `OxyContext` so the fixed `options → ceremony → verify → commit`
|
|
5
|
+
* ordering is unit-testable with injected deps — the exact pattern
|
|
6
|
+
* `commitSessionFlow.ts` (`commitDeviceSetAndResolve`) uses. The context methods
|
|
7
|
+
* (`signInWithPasskey` / `registerWithPasskey` / `addPasskey`) are thin wrappers
|
|
8
|
+
* that supply the real deps: the core `webauthn*` methods, the platform ceremony
|
|
9
|
+
* client (`webauthn/passkeyClient`), and the internal `commitSession` funnel.
|
|
10
|
+
*
|
|
11
|
+
* All three GATE on `isSupported()` first (the platform client returns `false`
|
|
12
|
+
* off the web) so an unsupported surface fails loudly before touching a ceremony.
|
|
13
|
+
*/
|
|
14
|
+
import type { LoginResult } from '@oxyhq/contracts';
|
|
15
|
+
import type { CommitInput } from './oxyContextTypes';
|
|
16
|
+
/**
|
|
17
|
+
* The result of `OxyServices.webauthnRegisterVerify` — either the LINK branch
|
|
18
|
+
* (`{ success, message }`, bearer present, no session) or the SIGNUP branch (a
|
|
19
|
+
* full {@link LoginResult}, which carries a `sessionId` on its session arm).
|
|
20
|
+
*/
|
|
21
|
+
export type PasskeyRegisterVerifyResult = {
|
|
22
|
+
success: true;
|
|
23
|
+
message: string;
|
|
24
|
+
} | LoginResult;
|
|
25
|
+
/** Thrown when a passkey flow is attempted on a surface that cannot run WebAuthn. */
|
|
26
|
+
export declare const PASSKEY_UNSUPPORTED_MESSAGE = "Passkeys are not available in this environment. Use another sign-in method.";
|
|
27
|
+
/** Injected dependencies for {@link runPasskeyLogin}. */
|
|
28
|
+
export interface RunPasskeyLoginDeps {
|
|
29
|
+
isSupported: () => boolean;
|
|
30
|
+
getLoginOptions: () => Promise<unknown>;
|
|
31
|
+
runCeremony: (optionsJSON: unknown) => Promise<unknown>;
|
|
32
|
+
loginVerify: (response: unknown, envelope: {
|
|
33
|
+
deviceName?: string;
|
|
34
|
+
deviceFingerprint?: string;
|
|
35
|
+
deviceId?: string;
|
|
36
|
+
}) => Promise<LoginResult>;
|
|
37
|
+
commit: (input: CommitInput) => Promise<void>;
|
|
38
|
+
deviceId?: string;
|
|
39
|
+
deviceName?: string;
|
|
40
|
+
deviceFingerprint?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Usernameless (discoverable-credential) passkey SIGN-IN: request login options,
|
|
44
|
+
* run the authentication ceremony, verify, then commit the session. A passkey
|
|
45
|
+
* assertion is itself the strong factor, so a 2FA arm here is a protocol error.
|
|
46
|
+
*/
|
|
47
|
+
export declare function runPasskeyLogin(deps: RunPasskeyLoginDeps): Promise<void>;
|
|
48
|
+
/** Injected dependencies for {@link runPasskeyRegister}. */
|
|
49
|
+
export interface RunPasskeyRegisterDeps {
|
|
50
|
+
isSupported: () => boolean;
|
|
51
|
+
getRegisterOptions: (username: string) => Promise<unknown>;
|
|
52
|
+
runCeremony: (optionsJSON: unknown) => Promise<unknown>;
|
|
53
|
+
registerVerify: (response: unknown, envelope: {
|
|
54
|
+
username: string;
|
|
55
|
+
deviceName?: string;
|
|
56
|
+
}) => Promise<PasskeyRegisterVerifyResult>;
|
|
57
|
+
commit: (input: CommitInput) => Promise<void>;
|
|
58
|
+
username: string;
|
|
59
|
+
deviceName?: string;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Passkey SIGNUP: create a brand-new account whose first auth method is a
|
|
63
|
+
* passkey. The verify signup branch mints a session (a {@link LoginSessionResult}
|
|
64
|
+
* carrying `sessionId`), which is committed exactly like a password signup.
|
|
65
|
+
*/
|
|
66
|
+
export declare function runPasskeyRegister(deps: RunPasskeyRegisterDeps): Promise<void>;
|
|
67
|
+
/** Injected dependencies for {@link runPasskeyAdd}. */
|
|
68
|
+
export interface RunPasskeyAddDeps {
|
|
69
|
+
isSupported: () => boolean;
|
|
70
|
+
getRegisterOptions: () => Promise<unknown>;
|
|
71
|
+
runCeremony: (optionsJSON: unknown) => Promise<unknown>;
|
|
72
|
+
registerVerify: (response: unknown, envelope: {
|
|
73
|
+
deviceName?: string;
|
|
74
|
+
}) => Promise<PasskeyRegisterVerifyResult>;
|
|
75
|
+
onLinked: () => void;
|
|
76
|
+
deviceName?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* ADD a passkey to the already-signed-in account (bearer present). The verify
|
|
80
|
+
* link branch returns `{ success, message }` with NO session — so this never
|
|
81
|
+
* commits a session; it just fires `onLinked` (which invalidates the
|
|
82
|
+
* auth-methods query). A session arm here would be a server contract violation.
|
|
83
|
+
*/
|
|
84
|
+
export declare function runPasskeyAdd(deps: RunPasskeyAddDeps): Promise<void>;
|
|
85
|
+
//# sourceMappingURL=passkeyFlow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeyFlow.d.ts","sourceRoot":"","sources":["../../../../../src/ui/context/passkeyFlow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAsB,MAAM,kBAAkB,CAAC;AACxE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD;;;;GAIG;AACH,MAAM,MAAM,2BAA2B,GAAG;IAAE,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,WAAW,CAAC;AAE3F,qFAAqF;AACrF,eAAO,MAAM,2BAA2B,gFACuC,CAAC;AAehF,yDAAyD;AACzD,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,OAAO,CAAC;IAC3B,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,WAAW,EAAE,CAAC,WAAW,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,WAAW,EAAE,CACX,QAAQ,EAAE,OAAO,EACjB,QAAQ,EAAE;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,KAC7E,OAAO,CAAC,WAAW,CAAC,CAAC;IAC1B,MAAM,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE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AAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAW1E"}
|
|
@@ -32,14 +32,14 @@ export declare const useUpdateProfile: () => import("@tanstack/react-query").Use
|
|
|
32
32
|
id: import("zod").ZodOptional<import("zod").ZodString>;
|
|
33
33
|
}, "strip", import("zod").ZodTypeAny, {
|
|
34
34
|
url: string;
|
|
35
|
-
id?: string | undefined;
|
|
36
35
|
description?: string | undefined;
|
|
36
|
+
id?: string | undefined;
|
|
37
37
|
title?: string | undefined;
|
|
38
38
|
image?: string | undefined;
|
|
39
39
|
}, {
|
|
40
40
|
url: string;
|
|
41
|
-
id?: string | undefined;
|
|
42
41
|
description?: string | undefined;
|
|
42
|
+
id?: string | undefined;
|
|
43
43
|
title?: string | undefined;
|
|
44
44
|
image?: string | undefined;
|
|
45
45
|
}>, "many">>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAerB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;aAqS4B,CAAC;YAEvD,CAAC;;aAEqC,CAAC;YAIxC,CAHA;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useAccountMutations.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/mutations/useAccountMutations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,IAAI,EACJ,eAAe,EAChB,MAAM,aAAa,CAAC;AAerB;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;aAqS4B,CAAC;YAEvD,CAAC;;aA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|
readonly recent: (limit: number) => readonly ["security", "recent", number];
|
|
52
52
|
readonly infinite: (limit: number, eventType?: string) => readonly ["security", "infinite", number, string | undefined];
|
|
53
53
|
};
|
|
54
|
+
readonly authMethods: {
|
|
55
|
+
readonly all: readonly ["authMethods"];
|
|
56
|
+
readonly list: (userId?: string) => readonly ["authMethods", "list", string];
|
|
57
|
+
};
|
|
54
58
|
readonly storage: {
|
|
55
59
|
readonly all: readonly ["storage"];
|
|
56
60
|
readonly usage: (accountScope?: string) => readonly ["storage", "usage", string | undefined];
|
|
@@ -99,6 +103,11 @@ export declare const invalidateSecurityQueries: (queryClient: QueryClient) => vo
|
|
|
99
103
|
* Helper to invalidate all storage-usage queries
|
|
100
104
|
*/
|
|
101
105
|
export declare const invalidateStorageQueries: (queryClient: QueryClient) => void;
|
|
106
|
+
/**
|
|
107
|
+
* Helper to invalidate the user's linked auth-methods list (call after linking
|
|
108
|
+
* or removing a passkey / password / identity key).
|
|
109
|
+
*/
|
|
110
|
+
export declare const invalidateAuthMethodsQueries: (queryClient: QueryClient) => void;
|
|
102
111
|
/**
|
|
103
112
|
* Helper to invalidate all payments / wallet / subscription queries
|
|
104
113
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryKeys.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/queryKeys.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEzD,eAAO,MAAM,SAAS;;;;oCAKC,MAAM,EAAE;;qCAEP,MAAM;uCACJ,MAAM,GAAG,IAAI;;;;;;iCAWnB,MAAM,EAAE;;kCAEP,MAAM;sCACF,MAAM;;;;;iCAOX,MAAM;;qCAEF,MAAM;;oCAEP,MAAM;;;;;uCAOH,MAAM;;oCAET,MAAM;;;;qCAML,MAAM;;;;oCAMP,MAAM,WAAW,MAAM,cAAc,MAAM;iCAE9C,MAAM;mCAEJ,MAAM,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AAI,aAAa,WAAW,KAAG,IAEvE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,aAAa,WAAW,KAAG,IAEpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,8BAA8B,GAAI,aAAa,WAAW,KAAG,IAEzE,CAAC"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import type { AuthMethodEntry, AuthMethodsResponse } from '@oxyhq/contracts';
|
|
2
|
+
/**
|
|
3
|
+
* The current account's linked authentication methods (`GET /auth/methods`),
|
|
4
|
+
* plus convenience projections. Backs the security / account surfaces that let a
|
|
5
|
+
* user see and manage their passwords, identity key, social logins, and passkeys.
|
|
6
|
+
*
|
|
7
|
+
* `passkeys` is the `type === 'webauthn'` subset — one entry per registered
|
|
8
|
+
* credential. Invalidate via `queryKeys.authMethods.all` after linking a passkey
|
|
9
|
+
* (`useOxy().addPasskey()` does this) or removing one.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useAuthMethods: (options?: {
|
|
12
|
+
enabled?: boolean;
|
|
13
|
+
}) => {
|
|
14
|
+
/** Every linked auth method. Empty while loading. */
|
|
15
|
+
methods: readonly AuthMethodEntry[];
|
|
16
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
17
|
+
passkeys: AuthMethodEntry[];
|
|
18
|
+
/** The account's DID, or `null` while loading. */
|
|
19
|
+
did: string | null;
|
|
20
|
+
data: NoInfer<AuthMethodsResponse>;
|
|
21
|
+
error: Error;
|
|
22
|
+
isError: true;
|
|
23
|
+
isPending: false;
|
|
24
|
+
isLoading: false;
|
|
25
|
+
isLoadingError: false;
|
|
26
|
+
isRefetchError: true;
|
|
27
|
+
isSuccess: false;
|
|
28
|
+
isPlaceholderData: false;
|
|
29
|
+
status: "error";
|
|
30
|
+
dataUpdatedAt: number;
|
|
31
|
+
errorUpdatedAt: number;
|
|
32
|
+
failureCount: number;
|
|
33
|
+
failureReason: Error | null;
|
|
34
|
+
errorUpdateCount: number;
|
|
35
|
+
isFetched: boolean;
|
|
36
|
+
isFetchedAfterMount: boolean;
|
|
37
|
+
isFetching: boolean;
|
|
38
|
+
isInitialLoading: boolean;
|
|
39
|
+
isPaused: boolean;
|
|
40
|
+
isRefetching: boolean;
|
|
41
|
+
isStale: boolean;
|
|
42
|
+
isEnabled: boolean;
|
|
43
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
44
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
45
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
46
|
+
} | {
|
|
47
|
+
/** Every linked auth method. Empty while loading. */
|
|
48
|
+
methods: readonly AuthMethodEntry[];
|
|
49
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
50
|
+
passkeys: AuthMethodEntry[];
|
|
51
|
+
/** The account's DID, or `null` while loading. */
|
|
52
|
+
did: string | null;
|
|
53
|
+
data: NoInfer<AuthMethodsResponse>;
|
|
54
|
+
error: null;
|
|
55
|
+
isError: false;
|
|
56
|
+
isPending: false;
|
|
57
|
+
isLoading: false;
|
|
58
|
+
isLoadingError: false;
|
|
59
|
+
isRefetchError: false;
|
|
60
|
+
isSuccess: true;
|
|
61
|
+
isPlaceholderData: false;
|
|
62
|
+
status: "success";
|
|
63
|
+
dataUpdatedAt: number;
|
|
64
|
+
errorUpdatedAt: number;
|
|
65
|
+
failureCount: number;
|
|
66
|
+
failureReason: Error | null;
|
|
67
|
+
errorUpdateCount: number;
|
|
68
|
+
isFetched: boolean;
|
|
69
|
+
isFetchedAfterMount: boolean;
|
|
70
|
+
isFetching: boolean;
|
|
71
|
+
isInitialLoading: boolean;
|
|
72
|
+
isPaused: boolean;
|
|
73
|
+
isRefetching: boolean;
|
|
74
|
+
isStale: boolean;
|
|
75
|
+
isEnabled: boolean;
|
|
76
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
77
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
78
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
79
|
+
} | {
|
|
80
|
+
/** Every linked auth method. Empty while loading. */
|
|
81
|
+
methods: readonly AuthMethodEntry[];
|
|
82
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
83
|
+
passkeys: AuthMethodEntry[];
|
|
84
|
+
/** The account's DID, or `null` while loading. */
|
|
85
|
+
did: string | null;
|
|
86
|
+
data: undefined;
|
|
87
|
+
error: Error;
|
|
88
|
+
isError: true;
|
|
89
|
+
isPending: false;
|
|
90
|
+
isLoading: false;
|
|
91
|
+
isLoadingError: true;
|
|
92
|
+
isRefetchError: false;
|
|
93
|
+
isSuccess: false;
|
|
94
|
+
isPlaceholderData: false;
|
|
95
|
+
status: "error";
|
|
96
|
+
dataUpdatedAt: number;
|
|
97
|
+
errorUpdatedAt: number;
|
|
98
|
+
failureCount: number;
|
|
99
|
+
failureReason: Error | null;
|
|
100
|
+
errorUpdateCount: number;
|
|
101
|
+
isFetched: boolean;
|
|
102
|
+
isFetchedAfterMount: boolean;
|
|
103
|
+
isFetching: boolean;
|
|
104
|
+
isInitialLoading: boolean;
|
|
105
|
+
isPaused: boolean;
|
|
106
|
+
isRefetching: boolean;
|
|
107
|
+
isStale: boolean;
|
|
108
|
+
isEnabled: boolean;
|
|
109
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
110
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
111
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
112
|
+
} | {
|
|
113
|
+
/** Every linked auth method. Empty while loading. */
|
|
114
|
+
methods: readonly AuthMethodEntry[];
|
|
115
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
116
|
+
passkeys: AuthMethodEntry[];
|
|
117
|
+
/** The account's DID, or `null` while loading. */
|
|
118
|
+
did: string | null;
|
|
119
|
+
data: undefined;
|
|
120
|
+
error: null;
|
|
121
|
+
isError: false;
|
|
122
|
+
isPending: true;
|
|
123
|
+
isLoading: true;
|
|
124
|
+
isLoadingError: false;
|
|
125
|
+
isRefetchError: false;
|
|
126
|
+
isSuccess: false;
|
|
127
|
+
isPlaceholderData: false;
|
|
128
|
+
status: "pending";
|
|
129
|
+
dataUpdatedAt: number;
|
|
130
|
+
errorUpdatedAt: number;
|
|
131
|
+
failureCount: number;
|
|
132
|
+
failureReason: Error | null;
|
|
133
|
+
errorUpdateCount: number;
|
|
134
|
+
isFetched: boolean;
|
|
135
|
+
isFetchedAfterMount: boolean;
|
|
136
|
+
isFetching: boolean;
|
|
137
|
+
isInitialLoading: boolean;
|
|
138
|
+
isPaused: boolean;
|
|
139
|
+
isRefetching: boolean;
|
|
140
|
+
isStale: boolean;
|
|
141
|
+
isEnabled: boolean;
|
|
142
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
143
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
144
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
145
|
+
} | {
|
|
146
|
+
/** Every linked auth method. Empty while loading. */
|
|
147
|
+
methods: readonly AuthMethodEntry[];
|
|
148
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
149
|
+
passkeys: AuthMethodEntry[];
|
|
150
|
+
/** The account's DID, or `null` while loading. */
|
|
151
|
+
did: string | null;
|
|
152
|
+
data: undefined;
|
|
153
|
+
error: null;
|
|
154
|
+
isError: false;
|
|
155
|
+
isPending: true;
|
|
156
|
+
isLoadingError: false;
|
|
157
|
+
isRefetchError: false;
|
|
158
|
+
isSuccess: false;
|
|
159
|
+
isPlaceholderData: false;
|
|
160
|
+
status: "pending";
|
|
161
|
+
dataUpdatedAt: number;
|
|
162
|
+
errorUpdatedAt: number;
|
|
163
|
+
failureCount: number;
|
|
164
|
+
failureReason: Error | null;
|
|
165
|
+
errorUpdateCount: number;
|
|
166
|
+
isFetched: boolean;
|
|
167
|
+
isFetchedAfterMount: boolean;
|
|
168
|
+
isFetching: boolean;
|
|
169
|
+
isLoading: boolean;
|
|
170
|
+
isInitialLoading: boolean;
|
|
171
|
+
isPaused: boolean;
|
|
172
|
+
isRefetching: boolean;
|
|
173
|
+
isStale: boolean;
|
|
174
|
+
isEnabled: boolean;
|
|
175
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
176
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
177
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
178
|
+
} | {
|
|
179
|
+
/** Every linked auth method. Empty while loading. */
|
|
180
|
+
methods: readonly AuthMethodEntry[];
|
|
181
|
+
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
182
|
+
passkeys: AuthMethodEntry[];
|
|
183
|
+
/** The account's DID, or `null` while loading. */
|
|
184
|
+
did: string | null;
|
|
185
|
+
data: NoInfer<AuthMethodsResponse>;
|
|
186
|
+
isError: false;
|
|
187
|
+
error: null;
|
|
188
|
+
isPending: false;
|
|
189
|
+
isLoading: false;
|
|
190
|
+
isLoadingError: false;
|
|
191
|
+
isRefetchError: false;
|
|
192
|
+
isSuccess: true;
|
|
193
|
+
isPlaceholderData: true;
|
|
194
|
+
status: "success";
|
|
195
|
+
dataUpdatedAt: number;
|
|
196
|
+
errorUpdatedAt: number;
|
|
197
|
+
failureCount: number;
|
|
198
|
+
failureReason: Error | null;
|
|
199
|
+
errorUpdateCount: number;
|
|
200
|
+
isFetched: boolean;
|
|
201
|
+
isFetchedAfterMount: boolean;
|
|
202
|
+
isFetching: boolean;
|
|
203
|
+
isInitialLoading: boolean;
|
|
204
|
+
isPaused: boolean;
|
|
205
|
+
isRefetching: boolean;
|
|
206
|
+
isStale: boolean;
|
|
207
|
+
isEnabled: boolean;
|
|
208
|
+
refetch: (options?: import("@tanstack/query-core").RefetchOptions) => Promise<import("@tanstack/query-core").QueryObserverResult<NoInfer<AuthMethodsResponse>, Error>>;
|
|
209
|
+
fetchStatus: import("@tanstack/query-core").FetchStatus;
|
|
210
|
+
promise: Promise<NoInfer<AuthMethodsResponse>>;
|
|
211
|
+
};
|
|
212
|
+
//# sourceMappingURL=useAuthMethods.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAuthMethods.d.ts","sourceRoot":"","sources":["../../../../../../src/ui/hooks/queries/useAuthMethods.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAO7E;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,UAAU;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE;IAmB1D,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAJlD,qDAAqD;;IAErD,6EAA6E;;IAE7E,kDAAkD;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGrD,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Passkey / WebAuthn ceremony client — clean default (non-web) implementation.
|
|
3
|
+
*
|
|
4
|
+
* This is the base module TypeScript resolves for TYPES and any bundler that
|
|
5
|
+
* does not pick a platform variant. It intentionally imports NOTHING browser-
|
|
6
|
+
* specific (no `@simplewebauthn/browser`) so it stays safe for Metro, native
|
|
7
|
+
* builds, and SSR. The real ceremony lives in `passkeyClient.web.ts`; native
|
|
8
|
+
* passkeys are Commons' job, so there is no WebAuthn ceremony here.
|
|
9
|
+
*
|
|
10
|
+
* `isPasskeySupported()` returns `false` (no relying-party origin / no browser
|
|
11
|
+
* WebAuthn API), and the ceremony helpers throw a clear error so a caller that
|
|
12
|
+
* skipped the support gate fails loudly instead of silently.
|
|
13
|
+
*/
|
|
14
|
+
/** Always `false` off the web — there is no relying-party origin or WebAuthn API. */
|
|
15
|
+
export declare function isPasskeySupported(): boolean;
|
|
16
|
+
/** Not available off the web — throws. Guard with {@link isPasskeySupported} first. */
|
|
17
|
+
export declare function runRegistrationCeremony(_optionsJSON: unknown): Promise<unknown>;
|
|
18
|
+
/** Not available off the web — throws. Guard with {@link isPasskeySupported} first. */
|
|
19
|
+
export declare function runAuthenticationCeremony(_optionsJSON: unknown): Promise<unknown>;
|
|
20
|
+
//# sourceMappingURL=passkeyClient.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"passkeyClient.d.ts","sourceRoot":"","sources":["../../../../src/webauthn/passkeyClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,qFAAqF;AACrF,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED,uFAAuF;AACvF,wBAAsB,uBAAuB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAErF;AAED,uFAAuF;AACvF,wBAAsB,yBAAyB,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAEvF"}
|