@fonderie/vue-auth 0.10.1 → 0.11.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/README.md +4 -4
- package/dist/index.cjs +34 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +32 -2
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Vue 3 composables for Fonderie auth — `useLogin`, `useRegister`,
|
|
4
4
|
`useSession`, `useLogout`, `useForgotPassword`, `useResetPassword`, and
|
|
5
5
|
`useVerifyEmail`. Thin bindings over
|
|
6
|
-
[`@fonderie/client`](https://github.com/fonderiejs/
|
|
6
|
+
[`@fonderie/client`](https://github.com/fonderiejs/fonderie/tree/main/packages/client):
|
|
7
7
|
reactive `ref`s for loading/error/data state and the request itself, nothing
|
|
8
8
|
else. Bring your own UI.
|
|
9
9
|
|
|
@@ -57,14 +57,14 @@ or a prop). The access token is persisted to `localStorage` and restored
|
|
|
57
57
|
automatically by `useSession` on setup; don't re-implement that in app code.
|
|
58
58
|
|
|
59
59
|
Want pre-built screens instead of wiring your own form?
|
|
60
|
-
See [`@fonderie/vue-auth-screens`](https://github.com/fonderiejs/
|
|
60
|
+
See [`@fonderie/vue-auth-screens`](https://github.com/fonderiejs/fonderie/tree/main/packages/vue-auth-screens).
|
|
61
61
|
|
|
62
62
|
## Why this exists
|
|
63
63
|
|
|
64
64
|
You've shipped this plumbing before — auth, teams, billing, messaging —
|
|
65
65
|
and the next project will ask for it again. Fonderie packages it once:
|
|
66
66
|
plain TypeScript modules for
|
|
67
|
-
[`@fonderie/core`](https://github.com/fonderiejs/
|
|
67
|
+
[`@fonderie/core`](https://github.com/fonderiejs/fonderie/tree/main/packages/core),
|
|
68
68
|
PostgreSQL-backed, self-hosted, MIT. No external control plane, no
|
|
69
69
|
per-seat anything. Register the modules you need; skip the ones you don't.
|
|
70
70
|
|
|
@@ -73,7 +73,7 @@ around `@fonderie/client`, nothing more. No business logic lives here; it
|
|
|
73
73
|
lives in `@fonderie/auth` on the server.
|
|
74
74
|
|
|
75
75
|
Browse the whole set at
|
|
76
|
-
[fonderiejs/
|
|
76
|
+
[fonderiejs/fonderie](https://github.com/fonderiejs/fonderie) · follow
|
|
77
77
|
[@fonderiejs](https://x.com/fonderiejs)
|
|
78
78
|
|
|
79
79
|
## License
|
package/dist/index.cjs
CHANGED
|
@@ -20,10 +20,10 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
FonderieApiError: () =>
|
|
23
|
+
FonderieApiError: () => import_client16.FonderieApiError,
|
|
24
24
|
TOKEN_KEY: () => TOKEN_KEY,
|
|
25
25
|
clearToken: () => clearToken,
|
|
26
|
-
isMfaRequired: () =>
|
|
26
|
+
isMfaRequired: () => import_client16.isMfaRequired,
|
|
27
27
|
persistToken: () => persistToken,
|
|
28
28
|
readToken: () => readToken,
|
|
29
29
|
useAccountData: () => useAccountData,
|
|
@@ -40,10 +40,11 @@ __export(index_exports, {
|
|
|
40
40
|
useResetPassword: () => useResetPassword,
|
|
41
41
|
useSession: () => useSession,
|
|
42
42
|
useSessions: () => useSessions,
|
|
43
|
+
useUnlinkOauth: () => useUnlinkOauth,
|
|
43
44
|
useVerifyEmail: () => useVerifyEmail
|
|
44
45
|
});
|
|
45
46
|
module.exports = __toCommonJS(index_exports);
|
|
46
|
-
var
|
|
47
|
+
var import_client16 = require("@fonderie/client");
|
|
47
48
|
|
|
48
49
|
// src/composables/useAccountData.ts
|
|
49
50
|
var import_client = require("@fonderie/client");
|
|
@@ -617,6 +618,35 @@ function useAuthProviders(client) {
|
|
|
617
618
|
refresh
|
|
618
619
|
};
|
|
619
620
|
}
|
|
621
|
+
|
|
622
|
+
// src/composables/useUnlinkOauth.ts
|
|
623
|
+
var import_client15 = require("@fonderie/client");
|
|
624
|
+
var import_vue31 = require("@fonderie/vue");
|
|
625
|
+
var import_vue32 = require("vue");
|
|
626
|
+
function useUnlinkOauth(client) {
|
|
627
|
+
const auth = (0, import_vue31.useFonderieSubClient)(client, (c) => c.auth, "useUnlinkOauth");
|
|
628
|
+
const isLoading = (0, import_vue32.ref)(false);
|
|
629
|
+
const error = (0, import_vue32.ref)(null);
|
|
630
|
+
const unlinked = (0, import_vue32.ref)(false);
|
|
631
|
+
const requiresPassword = (0, import_vue32.ref)(false);
|
|
632
|
+
const unlinkOauth = async (provider) => {
|
|
633
|
+
isLoading.value = true;
|
|
634
|
+
error.value = null;
|
|
635
|
+
requiresPassword.value = false;
|
|
636
|
+
try {
|
|
637
|
+
await auth.unlinkOauth(provider);
|
|
638
|
+
unlinked.value = true;
|
|
639
|
+
} catch (err) {
|
|
640
|
+
const apiError = err instanceof import_client15.FonderieApiError ? err : new import_client15.FonderieApiError("unknown", String(err), 0);
|
|
641
|
+
error.value = apiError;
|
|
642
|
+
requiresPassword.value = apiError.reason === "PASSWORD_REQUIRED";
|
|
643
|
+
throw apiError;
|
|
644
|
+
} finally {
|
|
645
|
+
isLoading.value = false;
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
return { unlinkOauth, unlinked, isLoading, error, requiresPassword };
|
|
649
|
+
}
|
|
620
650
|
// Annotate the CommonJS export names for ESM import in node:
|
|
621
651
|
0 && (module.exports = {
|
|
622
652
|
FonderieApiError,
|
|
@@ -639,6 +669,7 @@ function useAuthProviders(client) {
|
|
|
639
669
|
useResetPassword,
|
|
640
670
|
useSession,
|
|
641
671
|
useSessions,
|
|
672
|
+
useUnlinkOauth,
|
|
642
673
|
useVerifyEmail
|
|
643
674
|
});
|
|
644
675
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/composables/useAccountData.ts","../src/storage.ts","../src/composables/useChangePassword.ts","../src/composables/useForgotPassword.ts","../src/composables/useLogin.ts","../src/composables/useLogout.ts","../src/composables/useMfaLogin.ts","../src/composables/useMfaSetup.ts","../src/composables/useProfile.ts","../src/composables/useRegister.ts","../src/composables/useResetPassword.ts","../src/composables/useSession.ts","../src/composables/useLoginHistory.ts","../src/composables/useSessions.ts","../src/composables/useVerifyEmail.ts","../src/composables/useAuthProviders.ts"],"sourcesContent":["export type {\n\tAuthClient,\n\tIChangePasswordInput,\n\tIGetLoginHistoryInput,\n\tILoginEventDTO,\n\tILoginInput,\n\tILoginResult,\n\tIMfaEnabledResult,\n\tIMfaRequiredResult,\n\tIMfaSetupResult,\n\tIRegisterInput,\n\tIRegisterResult,\n\tIResetPasswordInput,\n\tISessionDTO,\n\tITokens,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n\tIVerifyEmailResult,\n} from '@fonderie/client';\n\nexport { FonderieApiError, isMfaRequired } from '@fonderie/client';\n\nexport type {\n\tIUseAuthProvidersReturn,\n\tIUseAccountDataReturn,\n\tIUseChangePasswordReturn,\n\tIUseForgotPasswordReturn,\n\tIUseLoginHistoryReturn,\n\tIUseLoginReturn,\n\tIUseLogoutReturn,\n\tIUseMfaLoginReturn,\n\tIUseMfaSetupReturn,\n\tIUseProfileReturn,\n\tIUseRegisterReturn,\n\tIUseResetPasswordReturn,\n\tIUseSessionReturn,\n\tIUseSessionsReturn,\n\tIUseVerifyEmailReturn,\n} from './composables';\nexport {\n\tuseAuthProviders,\n\tuseAccountData,\n\tuseChangePassword,\n\tuseForgotPassword,\n\tuseLogin,\n\tuseLoginHistory,\n\tuseLogout,\n\tuseMfaLogin,\n\tuseMfaSetup,\n\tuseProfile,\n\tuseRegister,\n\tuseResetPassword,\n\tuseSession,\n\tuseSessions,\n\tuseVerifyEmail,\n} from './composables';\n\n// Token persistence primitives — for wiring app-level flows (e.g. the\n// client's auth.onTokensChanged) to the same storage the hooks use.\nexport { clearToken, persistToken, readToken, TOKEN_KEY } from './storage';\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseAccountDataReturn {\n\t// GET /users/export — the caller's own data as a portable bundle (SAR).\n\texportData: () => Promise<unknown>;\n\t// Deletes the account, then tears the session down like a logout.\n\tdeleteUser: () => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useAccountData(client?: AuthClient): IUseAccountDataReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAccountData');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction exportData() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.exportData();\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction deleteUser() {\n\t\treturn run(async () => {\n\t\t\tawait auth.deleteUser();\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t});\n\t}\n\n\treturn { exportData, deleteUser, isLoading, error };\n}\n","export const TOKEN_KEY = 'fonderie_access_token';\n\nexport function persistToken(token: string) {\n\tlocalStorage.setItem(TOKEN_KEY, token);\n}\n\nexport function clearToken() {\n\tlocalStorage.removeItem(TOKEN_KEY);\n}\n\nexport function readToken(): string | null {\n\treturn localStorage.getItem(TOKEN_KEY);\n}\n","import type { AuthClient, IChangePasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseChangePasswordReturn {\n\tchangePassword: (input: IChangePasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useChangePassword(client?: AuthClient): IUseChangePasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useChangePassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function changePassword(input: IChangePasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tdone.value = false;\n\t\ttry {\n\t\t\tawait auth.changePassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { changePassword, isLoading, error, done };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseForgotPasswordReturn {\n\tforgotPassword: (email: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tsent: Ref<boolean>;\n}\n\nexport function useForgotPassword(client?: AuthClient): IUseForgotPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useForgotPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst sent = ref(false);\n\n\tasync function forgotPassword(email: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.forgotPassword(email);\n\t\t\tsent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { forgotPassword, isLoading, error, sent };\n}\n","import type { AuthClient, ILoginInput, ILoginResult, IMfaRequiredResult } from '@fonderie/client';\nimport { FonderieApiError, isMfaRequired } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseLoginReturn {\n\tlogin: (input: ILoginInput) => Promise<ILoginResult | IMfaRequiredResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n\t// Set when the account requires MFA: no tokens were issued — complete the\n\t// login with client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tmfaPending: Ref<IMfaRequiredResult | null>;\n}\n\nexport function useLogin(client?: AuthClient): IUseLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\t// Set when the account requires MFA: complete the login with\n\t// client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tconst mfaPending = ref<IMfaRequiredResult | null>(null);\n\n\tasync function login(input: ILoginInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tmfaPending.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.login(input);\n\t\t\tif (isMfaRequired(result)) {\n\t\t\t\tmfaPending.value = result;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { login, isLoading, error, data, mfaPending };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseLogoutReturn {\n\tlogout: (refreshToken?: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useLogout(client?: AuthClient): IUseLogoutReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogout');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function logout(refreshToken?: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { logout, isLoading, error };\n}\n","import type { AuthClient, ILoginResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaLoginReturn {\n\t// Completes a login that returned MFA_REQUIRED: verifies the TOTP code\n\t// against the temporary mfaToken from useLogin's mfaPending, then persists\n\t// the issued tokens exactly like a normal login.\n\tverifyLogin: (mfaToken: string, code: string) => Promise<ILoginResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n}\n\nexport function useMfaLogin(client?: AuthClient): IUseMfaLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\n\tasync function verifyLogin(mfaToken: string, code: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.mfa.verifyLogin(mfaToken, code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyLogin, isLoading, error, data };\n}\n","import type { AuthClient, IMfaEnabledResult, IMfaSetupResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseMfaSetupReturn {\n\t// Step 1: request enrollment — returns a data-URI QR code to scan and the\n\t// one-time backup codes generated at setup.\n\tsetup: () => Promise<IMfaSetupResult>;\n\tsetupData: Ref<IMfaSetupResult | null>;\n\t// Step 2: verify the first TOTP code to complete enrollment. The session\n\t// token is not rotated — MFA is enforced at login, so the current session\n\t// remains valid unchanged.\n\tverify: (code: string) => Promise<IMfaEnabledResult>;\n\tdisable: (code: string) => Promise<void>;\n\tregenerateBackupCodes: (code: string) => Promise<string[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useMfaSetup(client?: AuthClient): IUseMfaSetupReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaSetup');\n\tconst setupData = ref<IMfaSetupResult | null>(null);\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.setup();\n\t\t\tsetupData.value = result;\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction verify(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.verify(code);\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction disable(code: string) {\n\t\treturn run(async () => {\n\t\t\tawait auth.mfa.disable(code);\n\t\t});\n\t}\n\n\tfunction regenerateBackupCodes(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.regenerateBackupCodes(code);\n\t\t\treturn result.backupCodes;\n\t\t});\n\t}\n\n\treturn { setup, setupData, verify, disable, regenerateBackupCodes, isLoading, error };\n}\n","import type {\n\tAuthClient,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n} from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseProfileReturn {\n\tuser: Ref<IUserDTO | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tupdateProfile: (input: IUpdateProfileInput) => Promise<IUserDTO>;\n\tupdatePreferences: (input: IUpdatePreferencesInput) => Promise<IUserDTO>;\n\t// Email/phone changes re-fetch the profile (their endpoints don't return it).\n\tupdateEmail: (email: string) => Promise<void>;\n\tupdatePhone: (phone: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useProfile(client?: AuthClient): IUseProfileReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useProfile');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function mutate<T>(op: () => Promise<T>): Promise<T> {\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tfunction updateProfile(input: IUpdateProfileInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updateProfile(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updatePreferences(input: IUpdatePreferencesInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updatePreferences(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updateEmail(email: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updateEmail(email);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tfunction updatePhone(phone: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updatePhone(phone);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { user, refresh, updateProfile, updatePreferences, updateEmail, updatePhone, isLoading, error };\n}\n","import type { AuthClient, IRegisterInput, IRegisterResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseRegisterReturn {\n\tregister: (input: IRegisterInput) => Promise<IRegisterResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IRegisterResult | null>;\n}\n\nexport function useRegister(client?: AuthClient): IUseRegisterReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useRegister');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IRegisterResult | null>(null);\n\n\tasync function register(input: IRegisterInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.register(input);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { register, isLoading, error, data };\n}\n","import type { AuthClient, IResetPasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseResetPasswordReturn {\n\tresetPassword: (input: IResetPasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useResetPassword(client?: AuthClient): IUseResetPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useResetPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function resetPassword(input: IResetPasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.resetPassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { resetPassword, isLoading, error, done };\n}\n","import type { AuthClient, IUserDTO } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\nimport { clearToken, readToken } from '../storage';\n\nexport interface IUseSessionReturn {\n\tuser: Ref<IUserDTO | null>;\n\tisLoading: Ref<boolean>;\n\tisAuthenticated: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tlogout: (refreshToken?: string) => Promise<void>;\n}\n\nexport function useSession(client?: AuthClient): IUseSessionReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSession');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst isAuthenticated = ref(false);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t\tisAuthenticated.value = true;\n\t\t} catch {\n\t\t\tuser.value = null;\n\t\t\tisAuthenticated.value = false;\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function logout(refreshToken?: string) {\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch {\n\t\t\t// Session is being torn down regardless of server response.\n\t\t}\n\t\tauth.setAccessToken(undefined);\n\t\tclearToken();\n\t\tuser.value = null;\n\t\tisAuthenticated.value = false;\n\t}\n\n\tconst token = readToken();\n\tif (token) auth.setAccessToken(token);\n\tonMounted(() => void refresh());\n\n\treturn { user, isLoading, isAuthenticated, refresh, logout };\n}\n","import type { AuthClient, ILoginEventDTO, IGetLoginHistoryInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseLoginHistoryReturn {\n\tevents: Ref<ILoginEventDTO[]>;\n\tisLoading: Ref<boolean>;\n\tisLoadingMore: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\thasMore: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tloadMore: () => Promise<void>;\n}\n\n// The caller's own login attempts, newest first, keyset-paginated. Same contract\n// as react-auth's useLoginHistory (and vue-audit's useAuditEvents). Unlike React,\n// a composable body runs once, so filters need no memoization — they're captured\n// at call time.\nexport function useLoginHistory(rawFilters?: IGetLoginHistoryInput): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclient: AuthClient | undefined,\n\trawFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclientOrFilters?: AuthClient | IGetLoginHistoryInput,\n\tmaybeFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn {\n\t// The AuthClient isn't reliably an instanceof across bundle boundaries, so\n\t// detect the client arg structurally (it has getLoginHistory) rather than\n\t// by prototype.\n\tconst firstIsClient =\n\t\tclientOrFilters === undefined ||\n\t\ttypeof (clientOrFilters as AuthClient).getLoginHistory === 'function';\n\tconst explicit = firstIsClient ? (clientOrFilters as AuthClient | undefined) : undefined;\n\tconst filters = (firstIsClient ? maybeFilters : (clientOrFilters as IGetLoginHistoryInput)) ?? {};\n\tconst auth = useFonderieSubClient(explicit, (c) => c.auth, 'useLoginHistory');\n\n\tconst events = ref<ILoginEventDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst isLoadingMore = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst hasMore = ref(false);\n\tlet cursor: string | null = null;\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory(filters, { bust: opts?.force });\n\t\t\tevents.value = result.events;\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function loadMore() {\n\t\tif (!cursor || isLoadingMore.value) return;\n\t\tisLoadingMore.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory({ ...filters, cursor });\n\t\t\tevents.value = [...events.value, ...result.events];\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoadingMore.value = false;\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { events, isLoading, isLoadingMore, error, hasMore, refresh, loadMore };\n}\n","import type { AuthClient, ISessionDTO } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseSessionsReturn {\n\tsessions: Ref<ISessionDTO[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\t// Revoke one session. Optimistically removes it; refetches on failure.\n\tterminate: (id: string) => Promise<void>;\n\t// Revoke every session except the current one.\n\tterminateOthers: () => Promise<void>;\n}\n\nfunction toApiError(err: unknown): FonderieApiError {\n\treturn err instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n}\n\n// The caller's live sessions (one flagged `current`) plus the terminate actions.\n// Same contract as react-auth's useSessions.\nexport function useSessions(client?: AuthClient): IUseSessionsReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSessions');\n\tconst sessions = ref<ISessionDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.listSessions({ bust: opts?.force });\n\t\t\tsessions.value = result.sessions;\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function terminate(id: string) {\n\t\tconst prev = sessions.value;\n\t\tsessions.value = prev.filter((row) => row.id !== id); // optimistic\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateSession(id);\n\t\t} catch (err) {\n\t\t\tsessions.value = prev; // roll back the optimistic removal\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tasync function terminateOthers() {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateOtherSessions();\n\t\t\t// The server is the source of truth for which survived — refetch (force)\n\t\t\t// rather than trust a local \"keep current\" guess.\n\t\t\tawait refresh({ force: true });\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { sessions, isLoading, error, refresh, terminate, terminateOthers };\n}\n","import type { AuthClient, IVerifyEmailResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseVerifyEmailReturn {\n\tverifyEmail: (pin: string) => Promise<IVerifyEmailResult>;\n\tresend: () => Promise<void>;\n\tresent: Ref<boolean>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IVerifyEmailResult | null>;\n}\n\nexport function useVerifyEmail(client?: AuthClient): IUseVerifyEmailReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useVerifyEmail');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IVerifyEmailResult | null>(null);\n\tconst resent = ref(false);\n\n\t// Re-sends the verification email — the other half of the same lifecycle,\n\t// so one composable owns both and screens don't split loading/error handling.\n\tasync function resend() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tresent.value = false;\n\t\ttry {\n\t\t\tawait auth.sendVerificationEmail();\n\t\t\tresent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function verifyEmail(pin: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.verifyEmail(pin);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyEmail, resend, resent, isLoading, error, data };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseAuthProvidersReturn {\n\t/** Sign-in methods this deployment can honour, e.g. ['email','google']. */\n\tproviders: Ref<string[]>;\n\t/** The common case: should this button be rendered at all? */\n\thas: (provider: string) => boolean;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | Error | null>;\n\trefresh: () => Promise<void>;\n}\n\n// Ask the API which sign-in methods it can honour, and render buttons from\n// that — never from a build-time flag. A flag stores the same fact the API\n// already holds and lets the two disagree; the failure is a user committing to\n// a redirect and landing on the provider's error page, which this app cannot\n// explain. Same contract as react-auth's useAuthProviders.\n//\n// Starts EMPTY rather than optimistic: a brief moment with no social buttons is\n// invisible, a button that appears and then fails is not.\nexport function useAuthProviders(client?: AuthClient): IUseAuthProvidersReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAuthProviders');\n\tconst providers = ref<string[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | Error | null>(null);\n\n\tconst refresh = async (): Promise<void> => {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.providers();\n\t\t\tproviders.value = result.providers;\n\t\t\terror.value = null;\n\t\t} catch (err) {\n\t\t\t// Degrade to email-only rather than guessing: an unreachable API is\n\t\t\t// not evidence that a provider works.\n\t\t\tproviders.value = [];\n\t\t\terror.value = err instanceof Error ? err : new Error(String(err));\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t};\n\n\tonMounted(() => {\n\t\tvoid refresh();\n\t});\n\n\treturn {\n\t\tproviders,\n\t\thas: (provider: string) => providers.value.includes(provider),\n\t\tisLoading,\n\t\terror,\n\t\trefresh,\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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8C;AAC9E,QAAM,WAAO,mCAAqB,QAAQ,CAAC,MAAM,EAAE,MAAM,kBAAkB;AAC3E,QAAM,gBAAY,kBAAc,CAAC,CAAC;AAClC,QAAM,gBAAY,kBAAI,IAAI;AAC1B,QAAM,YAAQ,kBAAqC,IAAI;AAEvD,QAAM,UAAU,YAA2B;AAC1C,cAAU,QAAQ;AAClB,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,KAAK,UAAU;AACxC,gBAAU,QAAQ,OAAO;AACzB,YAAM,QAAQ;AAAA,IACf,SAAS,KAAK;AAGb,gBAAU,QAAQ,CAAC;AACnB,YAAM,QAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC;AAAA,IACjE,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,8BAAU,MAAM;AACf,SAAK,QAAQ;AAAA,EACd,CAAC;AAED,SAAO;AAAA,IACN;AAAA,IACA,KAAK,CAAC,aAAqB,UAAU,MAAM,SAAS,QAAQ;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":["import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/composables/useAccountData.ts","../src/storage.ts","../src/composables/useChangePassword.ts","../src/composables/useForgotPassword.ts","../src/composables/useLogin.ts","../src/composables/useLogout.ts","../src/composables/useMfaLogin.ts","../src/composables/useMfaSetup.ts","../src/composables/useProfile.ts","../src/composables/useRegister.ts","../src/composables/useResetPassword.ts","../src/composables/useSession.ts","../src/composables/useLoginHistory.ts","../src/composables/useSessions.ts","../src/composables/useVerifyEmail.ts","../src/composables/useAuthProviders.ts","../src/composables/useUnlinkOauth.ts"],"sourcesContent":["export type {\n\tAuthClient,\n\tIChangePasswordInput,\n\tIGetLoginHistoryInput,\n\tILoginEventDTO,\n\tILoginInput,\n\tILoginResult,\n\tIMfaEnabledResult,\n\tIMfaRequiredResult,\n\tIMfaSetupResult,\n\tIRegisterInput,\n\tIRegisterResult,\n\tIResetPasswordInput,\n\tISessionDTO,\n\tITokens,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n\tIVerifyEmailResult,\n} from '@fonderie/client';\n\nexport { FonderieApiError, isMfaRequired } from '@fonderie/client';\n\nexport type {\n\tIUseAuthProvidersReturn,\n\tIUseUnlinkOauthReturn,\n\tIUseAccountDataReturn,\n\tIUseChangePasswordReturn,\n\tIUseForgotPasswordReturn,\n\tIUseLoginHistoryReturn,\n\tIUseLoginReturn,\n\tIUseLogoutReturn,\n\tIUseMfaLoginReturn,\n\tIUseMfaSetupReturn,\n\tIUseProfileReturn,\n\tIUseRegisterReturn,\n\tIUseResetPasswordReturn,\n\tIUseSessionReturn,\n\tIUseSessionsReturn,\n\tIUseVerifyEmailReturn,\n} from './composables';\nexport {\n\tuseAuthProviders,\n\tuseUnlinkOauth,\n\tuseAccountData,\n\tuseChangePassword,\n\tuseForgotPassword,\n\tuseLogin,\n\tuseLoginHistory,\n\tuseLogout,\n\tuseMfaLogin,\n\tuseMfaSetup,\n\tuseProfile,\n\tuseRegister,\n\tuseResetPassword,\n\tuseSession,\n\tuseSessions,\n\tuseVerifyEmail,\n} from './composables';\n\n// Token persistence primitives — for wiring app-level flows (e.g. the\n// client's auth.onTokensChanged) to the same storage the hooks use.\nexport { clearToken, persistToken, readToken, TOKEN_KEY } from './storage';\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseAccountDataReturn {\n\t// GET /users/export — the caller's own data as a portable bundle (SAR).\n\texportData: () => Promise<unknown>;\n\t// Deletes the account, then tears the session down like a logout.\n\tdeleteUser: () => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useAccountData(client?: AuthClient): IUseAccountDataReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAccountData');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction exportData() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.exportData();\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction deleteUser() {\n\t\treturn run(async () => {\n\t\t\tawait auth.deleteUser();\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t});\n\t}\n\n\treturn { exportData, deleteUser, isLoading, error };\n}\n","export const TOKEN_KEY = 'fonderie_access_token';\n\nexport function persistToken(token: string) {\n\tlocalStorage.setItem(TOKEN_KEY, token);\n}\n\nexport function clearToken() {\n\tlocalStorage.removeItem(TOKEN_KEY);\n}\n\nexport function readToken(): string | null {\n\treturn localStorage.getItem(TOKEN_KEY);\n}\n","import type { AuthClient, IChangePasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseChangePasswordReturn {\n\tchangePassword: (input: IChangePasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useChangePassword(client?: AuthClient): IUseChangePasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useChangePassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function changePassword(input: IChangePasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tdone.value = false;\n\t\ttry {\n\t\t\tawait auth.changePassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { changePassword, isLoading, error, done };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseForgotPasswordReturn {\n\tforgotPassword: (email: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tsent: Ref<boolean>;\n}\n\nexport function useForgotPassword(client?: AuthClient): IUseForgotPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useForgotPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst sent = ref(false);\n\n\tasync function forgotPassword(email: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.forgotPassword(email);\n\t\t\tsent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { forgotPassword, isLoading, error, sent };\n}\n","import type { AuthClient, ILoginInput, ILoginResult, IMfaRequiredResult } from '@fonderie/client';\nimport { FonderieApiError, isMfaRequired } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseLoginReturn {\n\tlogin: (input: ILoginInput) => Promise<ILoginResult | IMfaRequiredResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n\t// Set when the account requires MFA: no tokens were issued — complete the\n\t// login with client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tmfaPending: Ref<IMfaRequiredResult | null>;\n}\n\nexport function useLogin(client?: AuthClient): IUseLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\t// Set when the account requires MFA: complete the login with\n\t// client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tconst mfaPending = ref<IMfaRequiredResult | null>(null);\n\n\tasync function login(input: ILoginInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tmfaPending.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.login(input);\n\t\t\tif (isMfaRequired(result)) {\n\t\t\t\tmfaPending.value = result;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { login, isLoading, error, data, mfaPending };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseLogoutReturn {\n\tlogout: (refreshToken?: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useLogout(client?: AuthClient): IUseLogoutReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogout');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function logout(refreshToken?: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { logout, isLoading, error };\n}\n","import type { AuthClient, ILoginResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaLoginReturn {\n\t// Completes a login that returned MFA_REQUIRED: verifies the TOTP code\n\t// against the temporary mfaToken from useLogin's mfaPending, then persists\n\t// the issued tokens exactly like a normal login.\n\tverifyLogin: (mfaToken: string, code: string) => Promise<ILoginResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n}\n\nexport function useMfaLogin(client?: AuthClient): IUseMfaLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\n\tasync function verifyLogin(mfaToken: string, code: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.mfa.verifyLogin(mfaToken, code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyLogin, isLoading, error, data };\n}\n","import type { AuthClient, IMfaEnabledResult, IMfaSetupResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseMfaSetupReturn {\n\t// Step 1: request enrollment — returns a data-URI QR code to scan and the\n\t// one-time backup codes generated at setup.\n\tsetup: () => Promise<IMfaSetupResult>;\n\tsetupData: Ref<IMfaSetupResult | null>;\n\t// Step 2: verify the first TOTP code to complete enrollment. The session\n\t// token is not rotated — MFA is enforced at login, so the current session\n\t// remains valid unchanged.\n\tverify: (code: string) => Promise<IMfaEnabledResult>;\n\tdisable: (code: string) => Promise<void>;\n\tregenerateBackupCodes: (code: string) => Promise<string[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useMfaSetup(client?: AuthClient): IUseMfaSetupReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaSetup');\n\tconst setupData = ref<IMfaSetupResult | null>(null);\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.setup();\n\t\t\tsetupData.value = result;\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction verify(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.verify(code);\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction disable(code: string) {\n\t\treturn run(async () => {\n\t\t\tawait auth.mfa.disable(code);\n\t\t});\n\t}\n\n\tfunction regenerateBackupCodes(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.regenerateBackupCodes(code);\n\t\t\treturn result.backupCodes;\n\t\t});\n\t}\n\n\treturn { setup, setupData, verify, disable, regenerateBackupCodes, isLoading, error };\n}\n","import type {\n\tAuthClient,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n} from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseProfileReturn {\n\tuser: Ref<IUserDTO | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tupdateProfile: (input: IUpdateProfileInput) => Promise<IUserDTO>;\n\tupdatePreferences: (input: IUpdatePreferencesInput) => Promise<IUserDTO>;\n\t// Email/phone changes re-fetch the profile (their endpoints don't return it).\n\tupdateEmail: (email: string) => Promise<void>;\n\tupdatePhone: (phone: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useProfile(client?: AuthClient): IUseProfileReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useProfile');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function mutate<T>(op: () => Promise<T>): Promise<T> {\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tfunction updateProfile(input: IUpdateProfileInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updateProfile(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updatePreferences(input: IUpdatePreferencesInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updatePreferences(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updateEmail(email: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updateEmail(email);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tfunction updatePhone(phone: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updatePhone(phone);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { user, refresh, updateProfile, updatePreferences, updateEmail, updatePhone, isLoading, error };\n}\n","import type { AuthClient, IRegisterInput, IRegisterResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseRegisterReturn {\n\tregister: (input: IRegisterInput) => Promise<IRegisterResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IRegisterResult | null>;\n}\n\nexport function useRegister(client?: AuthClient): IUseRegisterReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useRegister');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IRegisterResult | null>(null);\n\n\tasync function register(input: IRegisterInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.register(input);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { register, isLoading, error, data };\n}\n","import type { AuthClient, IResetPasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseResetPasswordReturn {\n\tresetPassword: (input: IResetPasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useResetPassword(client?: AuthClient): IUseResetPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useResetPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function resetPassword(input: IResetPasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.resetPassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { resetPassword, isLoading, error, done };\n}\n","import type { AuthClient, IUserDTO } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\nimport { clearToken, readToken } from '../storage';\n\nexport interface IUseSessionReturn {\n\tuser: Ref<IUserDTO | null>;\n\tisLoading: Ref<boolean>;\n\tisAuthenticated: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tlogout: (refreshToken?: string) => Promise<void>;\n}\n\nexport function useSession(client?: AuthClient): IUseSessionReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSession');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst isAuthenticated = ref(false);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t\tisAuthenticated.value = true;\n\t\t} catch {\n\t\t\tuser.value = null;\n\t\t\tisAuthenticated.value = false;\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function logout(refreshToken?: string) {\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch {\n\t\t\t// Session is being torn down regardless of server response.\n\t\t}\n\t\tauth.setAccessToken(undefined);\n\t\tclearToken();\n\t\tuser.value = null;\n\t\tisAuthenticated.value = false;\n\t}\n\n\tconst token = readToken();\n\tif (token) auth.setAccessToken(token);\n\tonMounted(() => void refresh());\n\n\treturn { user, isLoading, isAuthenticated, refresh, logout };\n}\n","import type { AuthClient, ILoginEventDTO, IGetLoginHistoryInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseLoginHistoryReturn {\n\tevents: Ref<ILoginEventDTO[]>;\n\tisLoading: Ref<boolean>;\n\tisLoadingMore: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\thasMore: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tloadMore: () => Promise<void>;\n}\n\n// The caller's own login attempts, newest first, keyset-paginated. Same contract\n// as react-auth's useLoginHistory (and vue-audit's useAuditEvents). Unlike React,\n// a composable body runs once, so filters need no memoization — they're captured\n// at call time.\nexport function useLoginHistory(rawFilters?: IGetLoginHistoryInput): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclient: AuthClient | undefined,\n\trawFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclientOrFilters?: AuthClient | IGetLoginHistoryInput,\n\tmaybeFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn {\n\t// The AuthClient isn't reliably an instanceof across bundle boundaries, so\n\t// detect the client arg structurally (it has getLoginHistory) rather than\n\t// by prototype.\n\tconst firstIsClient =\n\t\tclientOrFilters === undefined ||\n\t\ttypeof (clientOrFilters as AuthClient).getLoginHistory === 'function';\n\tconst explicit = firstIsClient ? (clientOrFilters as AuthClient | undefined) : undefined;\n\tconst filters = (firstIsClient ? maybeFilters : (clientOrFilters as IGetLoginHistoryInput)) ?? {};\n\tconst auth = useFonderieSubClient(explicit, (c) => c.auth, 'useLoginHistory');\n\n\tconst events = ref<ILoginEventDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst isLoadingMore = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst hasMore = ref(false);\n\tlet cursor: string | null = null;\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory(filters, { bust: opts?.force });\n\t\t\tevents.value = result.events;\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function loadMore() {\n\t\tif (!cursor || isLoadingMore.value) return;\n\t\tisLoadingMore.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory({ ...filters, cursor });\n\t\t\tevents.value = [...events.value, ...result.events];\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoadingMore.value = false;\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { events, isLoading, isLoadingMore, error, hasMore, refresh, loadMore };\n}\n","import type { AuthClient, ISessionDTO } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseSessionsReturn {\n\tsessions: Ref<ISessionDTO[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\t// Revoke one session. Optimistically removes it; refetches on failure.\n\tterminate: (id: string) => Promise<void>;\n\t// Revoke every session except the current one.\n\tterminateOthers: () => Promise<void>;\n}\n\nfunction toApiError(err: unknown): FonderieApiError {\n\treturn err instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n}\n\n// The caller's live sessions (one flagged `current`) plus the terminate actions.\n// Same contract as react-auth's useSessions.\nexport function useSessions(client?: AuthClient): IUseSessionsReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSessions');\n\tconst sessions = ref<ISessionDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.listSessions({ bust: opts?.force });\n\t\t\tsessions.value = result.sessions;\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function terminate(id: string) {\n\t\tconst prev = sessions.value;\n\t\tsessions.value = prev.filter((row) => row.id !== id); // optimistic\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateSession(id);\n\t\t} catch (err) {\n\t\t\tsessions.value = prev; // roll back the optimistic removal\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tasync function terminateOthers() {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateOtherSessions();\n\t\t\t// The server is the source of truth for which survived — refetch (force)\n\t\t\t// rather than trust a local \"keep current\" guess.\n\t\t\tawait refresh({ force: true });\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { sessions, isLoading, error, refresh, terminate, terminateOthers };\n}\n","import type { AuthClient, IVerifyEmailResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseVerifyEmailReturn {\n\tverifyEmail: (pin: string) => Promise<IVerifyEmailResult>;\n\tresend: () => Promise<void>;\n\tresent: Ref<boolean>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IVerifyEmailResult | null>;\n}\n\nexport function useVerifyEmail(client?: AuthClient): IUseVerifyEmailReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useVerifyEmail');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IVerifyEmailResult | null>(null);\n\tconst resent = ref(false);\n\n\t// Re-sends the verification email — the other half of the same lifecycle,\n\t// so one composable owns both and screens don't split loading/error handling.\n\tasync function resend() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tresent.value = false;\n\t\ttry {\n\t\t\tawait auth.sendVerificationEmail();\n\t\t\tresent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function verifyEmail(pin: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.verifyEmail(pin);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyEmail, resend, resent, isLoading, error, data };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseAuthProvidersReturn {\n\t/** Sign-in methods this deployment can honour, e.g. ['email','google']. */\n\tproviders: Ref<string[]>;\n\t/** The common case: should this button be rendered at all? */\n\thas: (provider: string) => boolean;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | Error | null>;\n\trefresh: () => Promise<void>;\n}\n\n// Ask the API which sign-in methods it can honour, and render buttons from\n// that — never from a build-time flag. A flag stores the same fact the API\n// already holds and lets the two disagree; the failure is a user committing to\n// a redirect and landing on the provider's error page, which this app cannot\n// explain. Same contract as react-auth's useAuthProviders.\n//\n// Starts EMPTY rather than optimistic: a brief moment with no social buttons is\n// invisible, a button that appears and then fails is not.\nexport function useAuthProviders(client?: AuthClient): IUseAuthProvidersReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAuthProviders');\n\tconst providers = ref<string[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | Error | null>(null);\n\n\tconst refresh = async (): Promise<void> => {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.providers();\n\t\t\tproviders.value = result.providers;\n\t\t\terror.value = null;\n\t\t} catch (err) {\n\t\t\t// Degrade to email-only rather than guessing: an unreachable API is\n\t\t\t// not evidence that a provider works.\n\t\t\tproviders.value = [];\n\t\t\terror.value = err instanceof Error ? err : new Error(String(err));\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t};\n\n\tonMounted(() => {\n\t\tvoid refresh();\n\t});\n\n\treturn {\n\t\tproviders,\n\t\thas: (provider: string) => providers.value.includes(provider),\n\t\tisLoading,\n\t\terror,\n\t\trefresh,\n\t};\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseUnlinkOauthReturn {\n\tunlinkOauth: (provider: string) => Promise<void>;\n\tunlinked: Ref<boolean>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\t// True when the server refused because the account has no password — the one\n\t// failure a settings screen should handle rather than just display, by\n\t// sending the user to set a password first. A flag so screens don't have to\n\t// match on the error's reason string.\n\trequiresPassword: Ref<boolean>;\n}\n\n/**\n * Remove the OAuth provider linked to the signed-in account.\n *\n * Prefer gating the control on `user.hasPassword` so the case is never reached:\n * an account created BY the provider has no other credential, and unlinking it\n * would be account deletion. The server refuses regardless (409), which is what\n * `requiresPassword` reports.\n */\nexport function useUnlinkOauth(client?: AuthClient): IUseUnlinkOauthReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useUnlinkOauth');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst unlinked = ref(false);\n\tconst requiresPassword = ref(false);\n\n\tconst unlinkOauth = async (provider: string): Promise<void> => {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\trequiresPassword.value = false;\n\t\ttry {\n\t\t\tawait auth.unlinkOauth(provider);\n\t\t\tunlinked.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\trequiresPassword.value = apiError.reason === 'PASSWORD_REQUIRED';\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t};\n\n\treturn { unlinkOauth, unlinked, isLoading, error, requiresPassword };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAqBA,IAAAA,kBAAgD;;;ACpBhD,oBAAiC;AACjC,iBAAqC;AAErC,IAAAC,cAAoB;;;ACJb,IAAM,YAAY;AAElB,SAAS,aAAa,OAAe;AAC3C,eAAa,QAAQ,WAAW,KAAK;AACtC;AAEO,SAAS,aAAa;AAC5B,eAAa,WAAW,SAAS;AAClC;AAEO,SAAS,YAA2B;AAC1C,SAAO,aAAa,QAAQ,SAAS;AACtC;;;ADIO,SAAS,eAAe,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,CAAC;AACnB,YAAM,QAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC;AAAA,IACjE,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,8BAAU,MAAM;AACf,SAAK,QAAQ;AAAA,EACd,CAAC;AAED,SAAO;AAAA,IACN;AAAA,IACA,KAAK,CAAC,aAAqB,UAAU,MAAM,SAAS,QAAQ;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;;;ACxDA,IAAAC,kBAAiC;AACjC,IAAAC,eAAqC;AAErC,IAAAA,eAAoB;AAsBb,SAAS,eAAe,QAA4C;AAC1E,QAAM,WAAO,mCAAqB,QAAQ,CAAC,MAAM,EAAE,MAAM,gBAAgB;AACzE,QAAM,gBAAY,kBAAI,KAAK;AAC3B,QAAM,YAAQ,kBAA6B,IAAI;AAC/C,QAAM,eAAW,kBAAI,KAAK;AAC1B,QAAM,uBAAmB,kBAAI,KAAK;AAElC,QAAM,cAAc,OAAO,aAAoC;AAC9D,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,qBAAiB,QAAQ;AACzB,QAAI;AACH,YAAM,KAAK,YAAY,QAAQ;AAC/B,eAAS,QAAQ;AAAA,IAClB,SAAS,KAAK;AACb,YAAM,WACL,eAAe,mCAAmB,MAAM,IAAI,iCAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,uBAAiB,QAAQ,SAAS,WAAW;AAC7C,YAAM;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,SAAO,EAAE,aAAa,UAAU,WAAW,OAAO,iBAAiB;AACpE;","names":["import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue","import_client","import_vue"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -149,9 +149,26 @@ interface IUseAuthProvidersReturn {
|
|
|
149
149
|
}
|
|
150
150
|
declare function useAuthProviders(client?: AuthClient): IUseAuthProvidersReturn;
|
|
151
151
|
|
|
152
|
+
interface IUseUnlinkOauthReturn {
|
|
153
|
+
unlinkOauth: (provider: string) => Promise<void>;
|
|
154
|
+
unlinked: Ref<boolean>;
|
|
155
|
+
isLoading: Ref<boolean>;
|
|
156
|
+
error: Ref<FonderieApiError | null>;
|
|
157
|
+
requiresPassword: Ref<boolean>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Remove the OAuth provider linked to the signed-in account.
|
|
161
|
+
*
|
|
162
|
+
* Prefer gating the control on `user.hasPassword` so the case is never reached:
|
|
163
|
+
* an account created BY the provider has no other credential, and unlinking it
|
|
164
|
+
* would be account deletion. The server refuses regardless (409), which is what
|
|
165
|
+
* `requiresPassword` reports.
|
|
166
|
+
*/
|
|
167
|
+
declare function useUnlinkOauth(client?: AuthClient): IUseUnlinkOauthReturn;
|
|
168
|
+
|
|
152
169
|
declare const TOKEN_KEY = "fonderie_access_token";
|
|
153
170
|
declare function persistToken(token: string): void;
|
|
154
171
|
declare function clearToken(): void;
|
|
155
172
|
declare function readToken(): string | null;
|
|
156
173
|
|
|
157
|
-
export { type IUseAccountDataReturn, type IUseAuthProvidersReturn, type IUseChangePasswordReturn, type IUseForgotPasswordReturn, type IUseLoginHistoryReturn, type IUseLoginReturn, type IUseLogoutReturn, type IUseMfaLoginReturn, type IUseMfaSetupReturn, type IUseProfileReturn, type IUseRegisterReturn, type IUseResetPasswordReturn, type IUseSessionReturn, type IUseSessionsReturn, type IUseVerifyEmailReturn, TOKEN_KEY, clearToken, persistToken, readToken, useAccountData, useAuthProviders, useChangePassword, useForgotPassword, useLogin, useLoginHistory, useLogout, useMfaLogin, useMfaSetup, useProfile, useRegister, useResetPassword, useSession, useSessions, useVerifyEmail };
|
|
174
|
+
export { type IUseAccountDataReturn, type IUseAuthProvidersReturn, type IUseChangePasswordReturn, type IUseForgotPasswordReturn, type IUseLoginHistoryReturn, type IUseLoginReturn, type IUseLogoutReturn, type IUseMfaLoginReturn, type IUseMfaSetupReturn, type IUseProfileReturn, type IUseRegisterReturn, type IUseResetPasswordReturn, type IUseSessionReturn, type IUseSessionsReturn, type IUseUnlinkOauthReturn, type IUseVerifyEmailReturn, TOKEN_KEY, clearToken, persistToken, readToken, useAccountData, useAuthProviders, useChangePassword, useForgotPassword, useLogin, useLoginHistory, useLogout, useMfaLogin, useMfaSetup, useProfile, useRegister, useResetPassword, useSession, useSessions, useUnlinkOauth, useVerifyEmail };
|
package/dist/index.d.ts
CHANGED
|
@@ -149,9 +149,26 @@ interface IUseAuthProvidersReturn {
|
|
|
149
149
|
}
|
|
150
150
|
declare function useAuthProviders(client?: AuthClient): IUseAuthProvidersReturn;
|
|
151
151
|
|
|
152
|
+
interface IUseUnlinkOauthReturn {
|
|
153
|
+
unlinkOauth: (provider: string) => Promise<void>;
|
|
154
|
+
unlinked: Ref<boolean>;
|
|
155
|
+
isLoading: Ref<boolean>;
|
|
156
|
+
error: Ref<FonderieApiError | null>;
|
|
157
|
+
requiresPassword: Ref<boolean>;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Remove the OAuth provider linked to the signed-in account.
|
|
161
|
+
*
|
|
162
|
+
* Prefer gating the control on `user.hasPassword` so the case is never reached:
|
|
163
|
+
* an account created BY the provider has no other credential, and unlinking it
|
|
164
|
+
* would be account deletion. The server refuses regardless (409), which is what
|
|
165
|
+
* `requiresPassword` reports.
|
|
166
|
+
*/
|
|
167
|
+
declare function useUnlinkOauth(client?: AuthClient): IUseUnlinkOauthReturn;
|
|
168
|
+
|
|
152
169
|
declare const TOKEN_KEY = "fonderie_access_token";
|
|
153
170
|
declare function persistToken(token: string): void;
|
|
154
171
|
declare function clearToken(): void;
|
|
155
172
|
declare function readToken(): string | null;
|
|
156
173
|
|
|
157
|
-
export { type IUseAccountDataReturn, type IUseAuthProvidersReturn, type IUseChangePasswordReturn, type IUseForgotPasswordReturn, type IUseLoginHistoryReturn, type IUseLoginReturn, type IUseLogoutReturn, type IUseMfaLoginReturn, type IUseMfaSetupReturn, type IUseProfileReturn, type IUseRegisterReturn, type IUseResetPasswordReturn, type IUseSessionReturn, type IUseSessionsReturn, type IUseVerifyEmailReturn, TOKEN_KEY, clearToken, persistToken, readToken, useAccountData, useAuthProviders, useChangePassword, useForgotPassword, useLogin, useLoginHistory, useLogout, useMfaLogin, useMfaSetup, useProfile, useRegister, useResetPassword, useSession, useSessions, useVerifyEmail };
|
|
174
|
+
export { type IUseAccountDataReturn, type IUseAuthProvidersReturn, type IUseChangePasswordReturn, type IUseForgotPasswordReturn, type IUseLoginHistoryReturn, type IUseLoginReturn, type IUseLogoutReturn, type IUseMfaLoginReturn, type IUseMfaSetupReturn, type IUseProfileReturn, type IUseRegisterReturn, type IUseResetPasswordReturn, type IUseSessionReturn, type IUseSessionsReturn, type IUseUnlinkOauthReturn, type IUseVerifyEmailReturn, TOKEN_KEY, clearToken, persistToken, readToken, useAccountData, useAuthProviders, useChangePassword, useForgotPassword, useLogin, useLoginHistory, useLogout, useMfaLogin, useMfaSetup, useProfile, useRegister, useResetPassword, useSession, useSessions, useUnlinkOauth, useVerifyEmail };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/index.ts
|
|
2
|
-
import { FonderieApiError as
|
|
2
|
+
import { FonderieApiError as FonderieApiError16, isMfaRequired as isMfaRequired2 } from "@fonderie/client";
|
|
3
3
|
|
|
4
4
|
// src/composables/useAccountData.ts
|
|
5
5
|
import { FonderieApiError } from "@fonderie/client";
|
|
@@ -573,8 +573,37 @@ function useAuthProviders(client) {
|
|
|
573
573
|
refresh
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
+
|
|
577
|
+
// src/composables/useUnlinkOauth.ts
|
|
578
|
+
import { FonderieApiError as FonderieApiError15 } from "@fonderie/client";
|
|
579
|
+
import { useFonderieSubClient as useFonderieSubClient16 } from "@fonderie/vue";
|
|
580
|
+
import { ref as ref16 } from "vue";
|
|
581
|
+
function useUnlinkOauth(client) {
|
|
582
|
+
const auth = useFonderieSubClient16(client, (c) => c.auth, "useUnlinkOauth");
|
|
583
|
+
const isLoading = ref16(false);
|
|
584
|
+
const error = ref16(null);
|
|
585
|
+
const unlinked = ref16(false);
|
|
586
|
+
const requiresPassword = ref16(false);
|
|
587
|
+
const unlinkOauth = async (provider) => {
|
|
588
|
+
isLoading.value = true;
|
|
589
|
+
error.value = null;
|
|
590
|
+
requiresPassword.value = false;
|
|
591
|
+
try {
|
|
592
|
+
await auth.unlinkOauth(provider);
|
|
593
|
+
unlinked.value = true;
|
|
594
|
+
} catch (err) {
|
|
595
|
+
const apiError = err instanceof FonderieApiError15 ? err : new FonderieApiError15("unknown", String(err), 0);
|
|
596
|
+
error.value = apiError;
|
|
597
|
+
requiresPassword.value = apiError.reason === "PASSWORD_REQUIRED";
|
|
598
|
+
throw apiError;
|
|
599
|
+
} finally {
|
|
600
|
+
isLoading.value = false;
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
return { unlinkOauth, unlinked, isLoading, error, requiresPassword };
|
|
604
|
+
}
|
|
576
605
|
export {
|
|
577
|
-
|
|
606
|
+
FonderieApiError16 as FonderieApiError,
|
|
578
607
|
TOKEN_KEY,
|
|
579
608
|
clearToken,
|
|
580
609
|
isMfaRequired2 as isMfaRequired,
|
|
@@ -594,6 +623,7 @@ export {
|
|
|
594
623
|
useResetPassword,
|
|
595
624
|
useSession,
|
|
596
625
|
useSessions,
|
|
626
|
+
useUnlinkOauth,
|
|
597
627
|
useVerifyEmail
|
|
598
628
|
};
|
|
599
629
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/composables/useAccountData.ts","../src/storage.ts","../src/composables/useChangePassword.ts","../src/composables/useForgotPassword.ts","../src/composables/useLogin.ts","../src/composables/useLogout.ts","../src/composables/useMfaLogin.ts","../src/composables/useMfaSetup.ts","../src/composables/useProfile.ts","../src/composables/useRegister.ts","../src/composables/useResetPassword.ts","../src/composables/useSession.ts","../src/composables/useLoginHistory.ts","../src/composables/useSessions.ts","../src/composables/useVerifyEmail.ts","../src/composables/useAuthProviders.ts"],"sourcesContent":["export type {\n\tAuthClient,\n\tIChangePasswordInput,\n\tIGetLoginHistoryInput,\n\tILoginEventDTO,\n\tILoginInput,\n\tILoginResult,\n\tIMfaEnabledResult,\n\tIMfaRequiredResult,\n\tIMfaSetupResult,\n\tIRegisterInput,\n\tIRegisterResult,\n\tIResetPasswordInput,\n\tISessionDTO,\n\tITokens,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n\tIVerifyEmailResult,\n} from '@fonderie/client';\n\nexport { FonderieApiError, isMfaRequired } from '@fonderie/client';\n\nexport type {\n\tIUseAuthProvidersReturn,\n\tIUseAccountDataReturn,\n\tIUseChangePasswordReturn,\n\tIUseForgotPasswordReturn,\n\tIUseLoginHistoryReturn,\n\tIUseLoginReturn,\n\tIUseLogoutReturn,\n\tIUseMfaLoginReturn,\n\tIUseMfaSetupReturn,\n\tIUseProfileReturn,\n\tIUseRegisterReturn,\n\tIUseResetPasswordReturn,\n\tIUseSessionReturn,\n\tIUseSessionsReturn,\n\tIUseVerifyEmailReturn,\n} from './composables';\nexport {\n\tuseAuthProviders,\n\tuseAccountData,\n\tuseChangePassword,\n\tuseForgotPassword,\n\tuseLogin,\n\tuseLoginHistory,\n\tuseLogout,\n\tuseMfaLogin,\n\tuseMfaSetup,\n\tuseProfile,\n\tuseRegister,\n\tuseResetPassword,\n\tuseSession,\n\tuseSessions,\n\tuseVerifyEmail,\n} from './composables';\n\n// Token persistence primitives — for wiring app-level flows (e.g. the\n// client's auth.onTokensChanged) to the same storage the hooks use.\nexport { clearToken, persistToken, readToken, TOKEN_KEY } from './storage';\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseAccountDataReturn {\n\t// GET /users/export — the caller's own data as a portable bundle (SAR).\n\texportData: () => Promise<unknown>;\n\t// Deletes the account, then tears the session down like a logout.\n\tdeleteUser: () => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useAccountData(client?: AuthClient): IUseAccountDataReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAccountData');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction exportData() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.exportData();\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction deleteUser() {\n\t\treturn run(async () => {\n\t\t\tawait auth.deleteUser();\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t});\n\t}\n\n\treturn { exportData, deleteUser, isLoading, error };\n}\n","export const TOKEN_KEY = 'fonderie_access_token';\n\nexport function persistToken(token: string) {\n\tlocalStorage.setItem(TOKEN_KEY, token);\n}\n\nexport function clearToken() {\n\tlocalStorage.removeItem(TOKEN_KEY);\n}\n\nexport function readToken(): string | null {\n\treturn localStorage.getItem(TOKEN_KEY);\n}\n","import type { AuthClient, IChangePasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseChangePasswordReturn {\n\tchangePassword: (input: IChangePasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useChangePassword(client?: AuthClient): IUseChangePasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useChangePassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function changePassword(input: IChangePasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tdone.value = false;\n\t\ttry {\n\t\t\tawait auth.changePassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { changePassword, isLoading, error, done };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseForgotPasswordReturn {\n\tforgotPassword: (email: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tsent: Ref<boolean>;\n}\n\nexport function useForgotPassword(client?: AuthClient): IUseForgotPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useForgotPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst sent = ref(false);\n\n\tasync function forgotPassword(email: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.forgotPassword(email);\n\t\t\tsent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { forgotPassword, isLoading, error, sent };\n}\n","import type { AuthClient, ILoginInput, ILoginResult, IMfaRequiredResult } from '@fonderie/client';\nimport { FonderieApiError, isMfaRequired } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseLoginReturn {\n\tlogin: (input: ILoginInput) => Promise<ILoginResult | IMfaRequiredResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n\t// Set when the account requires MFA: no tokens were issued — complete the\n\t// login with client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tmfaPending: Ref<IMfaRequiredResult | null>;\n}\n\nexport function useLogin(client?: AuthClient): IUseLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\t// Set when the account requires MFA: complete the login with\n\t// client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tconst mfaPending = ref<IMfaRequiredResult | null>(null);\n\n\tasync function login(input: ILoginInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tmfaPending.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.login(input);\n\t\t\tif (isMfaRequired(result)) {\n\t\t\t\tmfaPending.value = result;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { login, isLoading, error, data, mfaPending };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseLogoutReturn {\n\tlogout: (refreshToken?: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useLogout(client?: AuthClient): IUseLogoutReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogout');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function logout(refreshToken?: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { logout, isLoading, error };\n}\n","import type { AuthClient, ILoginResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaLoginReturn {\n\t// Completes a login that returned MFA_REQUIRED: verifies the TOTP code\n\t// against the temporary mfaToken from useLogin's mfaPending, then persists\n\t// the issued tokens exactly like a normal login.\n\tverifyLogin: (mfaToken: string, code: string) => Promise<ILoginResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n}\n\nexport function useMfaLogin(client?: AuthClient): IUseMfaLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\n\tasync function verifyLogin(mfaToken: string, code: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.mfa.verifyLogin(mfaToken, code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyLogin, isLoading, error, data };\n}\n","import type { AuthClient, IMfaEnabledResult, IMfaSetupResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseMfaSetupReturn {\n\t// Step 1: request enrollment — returns a data-URI QR code to scan and the\n\t// one-time backup codes generated at setup.\n\tsetup: () => Promise<IMfaSetupResult>;\n\tsetupData: Ref<IMfaSetupResult | null>;\n\t// Step 2: verify the first TOTP code to complete enrollment. The session\n\t// token is not rotated — MFA is enforced at login, so the current session\n\t// remains valid unchanged.\n\tverify: (code: string) => Promise<IMfaEnabledResult>;\n\tdisable: (code: string) => Promise<void>;\n\tregenerateBackupCodes: (code: string) => Promise<string[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useMfaSetup(client?: AuthClient): IUseMfaSetupReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaSetup');\n\tconst setupData = ref<IMfaSetupResult | null>(null);\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.setup();\n\t\t\tsetupData.value = result;\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction verify(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.verify(code);\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction disable(code: string) {\n\t\treturn run(async () => {\n\t\t\tawait auth.mfa.disable(code);\n\t\t});\n\t}\n\n\tfunction regenerateBackupCodes(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.regenerateBackupCodes(code);\n\t\t\treturn result.backupCodes;\n\t\t});\n\t}\n\n\treturn { setup, setupData, verify, disable, regenerateBackupCodes, isLoading, error };\n}\n","import type {\n\tAuthClient,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n} from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseProfileReturn {\n\tuser: Ref<IUserDTO | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tupdateProfile: (input: IUpdateProfileInput) => Promise<IUserDTO>;\n\tupdatePreferences: (input: IUpdatePreferencesInput) => Promise<IUserDTO>;\n\t// Email/phone changes re-fetch the profile (their endpoints don't return it).\n\tupdateEmail: (email: string) => Promise<void>;\n\tupdatePhone: (phone: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useProfile(client?: AuthClient): IUseProfileReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useProfile');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function mutate<T>(op: () => Promise<T>): Promise<T> {\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tfunction updateProfile(input: IUpdateProfileInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updateProfile(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updatePreferences(input: IUpdatePreferencesInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updatePreferences(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updateEmail(email: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updateEmail(email);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tfunction updatePhone(phone: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updatePhone(phone);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { user, refresh, updateProfile, updatePreferences, updateEmail, updatePhone, isLoading, error };\n}\n","import type { AuthClient, IRegisterInput, IRegisterResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseRegisterReturn {\n\tregister: (input: IRegisterInput) => Promise<IRegisterResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IRegisterResult | null>;\n}\n\nexport function useRegister(client?: AuthClient): IUseRegisterReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useRegister');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IRegisterResult | null>(null);\n\n\tasync function register(input: IRegisterInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.register(input);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { register, isLoading, error, data };\n}\n","import type { AuthClient, IResetPasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseResetPasswordReturn {\n\tresetPassword: (input: IResetPasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useResetPassword(client?: AuthClient): IUseResetPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useResetPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function resetPassword(input: IResetPasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.resetPassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { resetPassword, isLoading, error, done };\n}\n","import type { AuthClient, IUserDTO } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\nimport { clearToken, readToken } from '../storage';\n\nexport interface IUseSessionReturn {\n\tuser: Ref<IUserDTO | null>;\n\tisLoading: Ref<boolean>;\n\tisAuthenticated: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tlogout: (refreshToken?: string) => Promise<void>;\n}\n\nexport function useSession(client?: AuthClient): IUseSessionReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSession');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst isAuthenticated = ref(false);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t\tisAuthenticated.value = true;\n\t\t} catch {\n\t\t\tuser.value = null;\n\t\t\tisAuthenticated.value = false;\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function logout(refreshToken?: string) {\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch {\n\t\t\t// Session is being torn down regardless of server response.\n\t\t}\n\t\tauth.setAccessToken(undefined);\n\t\tclearToken();\n\t\tuser.value = null;\n\t\tisAuthenticated.value = false;\n\t}\n\n\tconst token = readToken();\n\tif (token) auth.setAccessToken(token);\n\tonMounted(() => void refresh());\n\n\treturn { user, isLoading, isAuthenticated, refresh, logout };\n}\n","import type { AuthClient, ILoginEventDTO, IGetLoginHistoryInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseLoginHistoryReturn {\n\tevents: Ref<ILoginEventDTO[]>;\n\tisLoading: Ref<boolean>;\n\tisLoadingMore: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\thasMore: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tloadMore: () => Promise<void>;\n}\n\n// The caller's own login attempts, newest first, keyset-paginated. Same contract\n// as react-auth's useLoginHistory (and vue-audit's useAuditEvents). Unlike React,\n// a composable body runs once, so filters need no memoization — they're captured\n// at call time.\nexport function useLoginHistory(rawFilters?: IGetLoginHistoryInput): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclient: AuthClient | undefined,\n\trawFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclientOrFilters?: AuthClient | IGetLoginHistoryInput,\n\tmaybeFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn {\n\t// The AuthClient isn't reliably an instanceof across bundle boundaries, so\n\t// detect the client arg structurally (it has getLoginHistory) rather than\n\t// by prototype.\n\tconst firstIsClient =\n\t\tclientOrFilters === undefined ||\n\t\ttypeof (clientOrFilters as AuthClient).getLoginHistory === 'function';\n\tconst explicit = firstIsClient ? (clientOrFilters as AuthClient | undefined) : undefined;\n\tconst filters = (firstIsClient ? maybeFilters : (clientOrFilters as IGetLoginHistoryInput)) ?? {};\n\tconst auth = useFonderieSubClient(explicit, (c) => c.auth, 'useLoginHistory');\n\n\tconst events = ref<ILoginEventDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst isLoadingMore = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst hasMore = ref(false);\n\tlet cursor: string | null = null;\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory(filters, { bust: opts?.force });\n\t\t\tevents.value = result.events;\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function loadMore() {\n\t\tif (!cursor || isLoadingMore.value) return;\n\t\tisLoadingMore.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory({ ...filters, cursor });\n\t\t\tevents.value = [...events.value, ...result.events];\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoadingMore.value = false;\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { events, isLoading, isLoadingMore, error, hasMore, refresh, loadMore };\n}\n","import type { AuthClient, ISessionDTO } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseSessionsReturn {\n\tsessions: Ref<ISessionDTO[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\t// Revoke one session. Optimistically removes it; refetches on failure.\n\tterminate: (id: string) => Promise<void>;\n\t// Revoke every session except the current one.\n\tterminateOthers: () => Promise<void>;\n}\n\nfunction toApiError(err: unknown): FonderieApiError {\n\treturn err instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n}\n\n// The caller's live sessions (one flagged `current`) plus the terminate actions.\n// Same contract as react-auth's useSessions.\nexport function useSessions(client?: AuthClient): IUseSessionsReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSessions');\n\tconst sessions = ref<ISessionDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.listSessions({ bust: opts?.force });\n\t\t\tsessions.value = result.sessions;\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function terminate(id: string) {\n\t\tconst prev = sessions.value;\n\t\tsessions.value = prev.filter((row) => row.id !== id); // optimistic\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateSession(id);\n\t\t} catch (err) {\n\t\t\tsessions.value = prev; // roll back the optimistic removal\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tasync function terminateOthers() {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateOtherSessions();\n\t\t\t// The server is the source of truth for which survived — refetch (force)\n\t\t\t// rather than trust a local \"keep current\" guess.\n\t\t\tawait refresh({ force: true });\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { sessions, isLoading, error, refresh, terminate, terminateOthers };\n}\n","import type { AuthClient, IVerifyEmailResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseVerifyEmailReturn {\n\tverifyEmail: (pin: string) => Promise<IVerifyEmailResult>;\n\tresend: () => Promise<void>;\n\tresent: Ref<boolean>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IVerifyEmailResult | null>;\n}\n\nexport function useVerifyEmail(client?: AuthClient): IUseVerifyEmailReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useVerifyEmail');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IVerifyEmailResult | null>(null);\n\tconst resent = ref(false);\n\n\t// Re-sends the verification email — the other half of the same lifecycle,\n\t// so one composable owns both and screens don't split loading/error handling.\n\tasync function resend() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tresent.value = false;\n\t\ttry {\n\t\t\tawait auth.sendVerificationEmail();\n\t\t\tresent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function verifyEmail(pin: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.verifyEmail(pin);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyEmail, resend, resent, isLoading, error, data };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseAuthProvidersReturn {\n\t/** Sign-in methods this deployment can honour, e.g. ['email','google']. */\n\tproviders: Ref<string[]>;\n\t/** The common case: should this button be rendered at all? */\n\thas: (provider: string) => boolean;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | Error | null>;\n\trefresh: () => Promise<void>;\n}\n\n// Ask the API which sign-in methods it can honour, and render buttons from\n// that — never from a build-time flag. A flag stores the same fact the API\n// already holds and lets the two disagree; the failure is a user committing to\n// a redirect and landing on the provider's error page, which this app cannot\n// explain. Same contract as react-auth's useAuthProviders.\n//\n// Starts EMPTY rather than optimistic: a brief moment with no social buttons is\n// invisible, a button that appears and then fails is not.\nexport function useAuthProviders(client?: AuthClient): IUseAuthProvidersReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAuthProviders');\n\tconst providers = ref<string[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | Error | null>(null);\n\n\tconst refresh = async (): Promise<void> => {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.providers();\n\t\t\tproviders.value = result.providers;\n\t\t\terror.value = null;\n\t\t} catch (err) {\n\t\t\t// Degrade to email-only rather than guessing: an unreachable API is\n\t\t\t// not evidence that a provider works.\n\t\t\tproviders.value = [];\n\t\t\terror.value = err instanceof Error ? err : new Error(String(err));\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t};\n\n\tonMounted(() => {\n\t\tvoid refresh();\n\t});\n\n\treturn {\n\t\tproviders,\n\t\thas: (provider: string) => providers.value.includes(provider),\n\t\tisLoading,\n\t\terror,\n\t\trefresh,\n\t};\n}\n"],"mappings":";AAqBA,SAAS,oBAAAA,oBAAkB,iBAAAC,sBAAqB;;;ACpBhD,SAAS,wBAAwB;AACjC,SAAS,4BAA4B;AAErC,SAAS,WAAW;;;ACJb,IAAM,YAAY;AAElB,S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A,SAAO,EAAE,aAAa,QAAQ,QAAQ,WAAW,OAAO,KAAK;AAC9D;;;AC1DA,OAAiC;AACjC,SAAS,wBAAAG,8BAA4B;AAErC,SAAS,aAAAC,YAAW,OAAAC,aAAW;AAoBxB,SAAS,iBAAiB,QAA8C;AAC9E,QAAM,OAAOF,uBAAqB,QAAQ,CAAC,MAAM,EAAE,MAAM,kBAAkB;AAC3E,QAAM,YAAYE,MAAc,CAAC,CAAC;AAClC,QAAM,YAAYA,MAAI,IAAI;AAC1B,QAAM,QAAQA,MAAqC,IAAI;AAEvD,QAAM,UAAU,YAA2B;AAC1C,cAAU,QAAQ;AAClB,QAAI;AACH,YAAM,EAAE,OAAO,IAAI,MAAM,KAAK,UAAU;AACxC,gBAAU,QAAQ,OAAO;AACzB,YAAM,QAAQ;AAAA,IACf,SAAS,KAAK;AAGb,gBAAU,QAAQ,CAAC;AACnB,YAAM,QAAQ,eAAe,QAAQ,MAAM,IAAI,MAAM,OAAO,GAAG,CAAC;AAAA,IACjE,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,EAAAD,WAAU,MAAM;AACf,SAAK,QAAQ;AAAA,EACd,CAAC;AAED,SAAO;AAAA,IACN;AAAA,IACA,KAAK,CAAC,aAAqB,UAAU,MAAM,SAAS,QAAQ;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,EACD;AACD;","names":["FonderieApiError","isMfaRequired","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","onMounted","ref","useFonderieSubClient","ref","onMounted","FonderieApiError","useFonderieSubClient","onMounted","ref","FonderieApiError","useFonderieSubClient","onMounted","ref","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","onMounted","ref"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/composables/useAccountData.ts","../src/storage.ts","../src/composables/useChangePassword.ts","../src/composables/useForgotPassword.ts","../src/composables/useLogin.ts","../src/composables/useLogout.ts","../src/composables/useMfaLogin.ts","../src/composables/useMfaSetup.ts","../src/composables/useProfile.ts","../src/composables/useRegister.ts","../src/composables/useResetPassword.ts","../src/composables/useSession.ts","../src/composables/useLoginHistory.ts","../src/composables/useSessions.ts","../src/composables/useVerifyEmail.ts","../src/composables/useAuthProviders.ts","../src/composables/useUnlinkOauth.ts"],"sourcesContent":["export type {\n\tAuthClient,\n\tIChangePasswordInput,\n\tIGetLoginHistoryInput,\n\tILoginEventDTO,\n\tILoginInput,\n\tILoginResult,\n\tIMfaEnabledResult,\n\tIMfaRequiredResult,\n\tIMfaSetupResult,\n\tIRegisterInput,\n\tIRegisterResult,\n\tIResetPasswordInput,\n\tISessionDTO,\n\tITokens,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n\tIVerifyEmailResult,\n} from '@fonderie/client';\n\nexport { FonderieApiError, isMfaRequired } from '@fonderie/client';\n\nexport type {\n\tIUseAuthProvidersReturn,\n\tIUseUnlinkOauthReturn,\n\tIUseAccountDataReturn,\n\tIUseChangePasswordReturn,\n\tIUseForgotPasswordReturn,\n\tIUseLoginHistoryReturn,\n\tIUseLoginReturn,\n\tIUseLogoutReturn,\n\tIUseMfaLoginReturn,\n\tIUseMfaSetupReturn,\n\tIUseProfileReturn,\n\tIUseRegisterReturn,\n\tIUseResetPasswordReturn,\n\tIUseSessionReturn,\n\tIUseSessionsReturn,\n\tIUseVerifyEmailReturn,\n} from './composables';\nexport {\n\tuseAuthProviders,\n\tuseUnlinkOauth,\n\tuseAccountData,\n\tuseChangePassword,\n\tuseForgotPassword,\n\tuseLogin,\n\tuseLoginHistory,\n\tuseLogout,\n\tuseMfaLogin,\n\tuseMfaSetup,\n\tuseProfile,\n\tuseRegister,\n\tuseResetPassword,\n\tuseSession,\n\tuseSessions,\n\tuseVerifyEmail,\n} from './composables';\n\n// Token persistence primitives — for wiring app-level flows (e.g. the\n// client's auth.onTokensChanged) to the same storage the hooks use.\nexport { clearToken, persistToken, readToken, TOKEN_KEY } from './storage';\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseAccountDataReturn {\n\t// GET /users/export — the caller's own data as a portable bundle (SAR).\n\texportData: () => Promise<unknown>;\n\t// Deletes the account, then tears the session down like a logout.\n\tdeleteUser: () => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useAccountData(client?: AuthClient): IUseAccountDataReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAccountData');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction exportData() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.exportData();\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction deleteUser() {\n\t\treturn run(async () => {\n\t\t\tawait auth.deleteUser();\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t});\n\t}\n\n\treturn { exportData, deleteUser, isLoading, error };\n}\n","export const TOKEN_KEY = 'fonderie_access_token';\n\nexport function persistToken(token: string) {\n\tlocalStorage.setItem(TOKEN_KEY, token);\n}\n\nexport function clearToken() {\n\tlocalStorage.removeItem(TOKEN_KEY);\n}\n\nexport function readToken(): string | null {\n\treturn localStorage.getItem(TOKEN_KEY);\n}\n","import type { AuthClient, IChangePasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseChangePasswordReturn {\n\tchangePassword: (input: IChangePasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useChangePassword(client?: AuthClient): IUseChangePasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useChangePassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function changePassword(input: IChangePasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tdone.value = false;\n\t\ttry {\n\t\t\tawait auth.changePassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { changePassword, isLoading, error, done };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseForgotPasswordReturn {\n\tforgotPassword: (email: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tsent: Ref<boolean>;\n}\n\nexport function useForgotPassword(client?: AuthClient): IUseForgotPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useForgotPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst sent = ref(false);\n\n\tasync function forgotPassword(email: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.forgotPassword(email);\n\t\t\tsent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { forgotPassword, isLoading, error, sent };\n}\n","import type { AuthClient, ILoginInput, ILoginResult, IMfaRequiredResult } from '@fonderie/client';\nimport { FonderieApiError, isMfaRequired } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseLoginReturn {\n\tlogin: (input: ILoginInput) => Promise<ILoginResult | IMfaRequiredResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n\t// Set when the account requires MFA: no tokens were issued — complete the\n\t// login with client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tmfaPending: Ref<IMfaRequiredResult | null>;\n}\n\nexport function useLogin(client?: AuthClient): IUseLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\t// Set when the account requires MFA: complete the login with\n\t// client.auth.mfa.verifyLogin(mfaPending.value.mfaToken, code).\n\tconst mfaPending = ref<IMfaRequiredResult | null>(null);\n\n\tasync function login(input: ILoginInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tmfaPending.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.login(input);\n\t\t\tif (isMfaRequired(result)) {\n\t\t\t\tmfaPending.value = result;\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { login, isLoading, error, data, mfaPending };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { clearToken } from '../storage';\n\nexport interface IUseLogoutReturn {\n\tlogout: (refreshToken?: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useLogout(client?: AuthClient): IUseLogoutReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useLogout');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function logout(refreshToken?: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { logout, isLoading, error };\n}\n","import type { AuthClient, ILoginResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseMfaLoginReturn {\n\t// Completes a login that returned MFA_REQUIRED: verifies the TOTP code\n\t// against the temporary mfaToken from useLogin's mfaPending, then persists\n\t// the issued tokens exactly like a normal login.\n\tverifyLogin: (mfaToken: string, code: string) => Promise<ILoginResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<ILoginResult | null>;\n}\n\nexport function useMfaLogin(client?: AuthClient): IUseMfaLoginReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaLogin');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<ILoginResult | null>(null);\n\n\tasync function verifyLogin(mfaToken: string, code: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.mfa.verifyLogin(mfaToken, code);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyLogin, isLoading, error, data };\n}\n","import type { AuthClient, IMfaEnabledResult, IMfaSetupResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseMfaSetupReturn {\n\t// Step 1: request enrollment — returns a data-URI QR code to scan and the\n\t// one-time backup codes generated at setup.\n\tsetup: () => Promise<IMfaSetupResult>;\n\tsetupData: Ref<IMfaSetupResult | null>;\n\t// Step 2: verify the first TOTP code to complete enrollment. The session\n\t// token is not rotated — MFA is enforced at login, so the current session\n\t// remains valid unchanged.\n\tverify: (code: string) => Promise<IMfaEnabledResult>;\n\tdisable: (code: string) => Promise<void>;\n\tregenerateBackupCodes: (code: string) => Promise<string[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useMfaSetup(client?: AuthClient): IUseMfaSetupReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useMfaSetup');\n\tconst setupData = ref<IMfaSetupResult | null>(null);\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function run<T>(op: () => Promise<T>): Promise<T> {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tfunction setup() {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.setup();\n\t\t\tsetupData.value = result;\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction verify(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.verify(code);\n\t\t\treturn result;\n\t\t});\n\t}\n\n\tfunction disable(code: string) {\n\t\treturn run(async () => {\n\t\t\tawait auth.mfa.disable(code);\n\t\t});\n\t}\n\n\tfunction regenerateBackupCodes(code: string) {\n\t\treturn run(async () => {\n\t\t\tconst { result } = await auth.mfa.regenerateBackupCodes(code);\n\t\t\treturn result.backupCodes;\n\t\t});\n\t}\n\n\treturn { setup, setupData, verify, disable, regenerateBackupCodes, isLoading, error };\n}\n","import type {\n\tAuthClient,\n\tIUpdatePreferencesInput,\n\tIUpdateProfileInput,\n\tIUserDTO,\n} from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseProfileReturn {\n\tuser: Ref<IUserDTO | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tupdateProfile: (input: IUpdateProfileInput) => Promise<IUserDTO>;\n\tupdatePreferences: (input: IUpdatePreferencesInput) => Promise<IUserDTO>;\n\t// Email/phone changes re-fetch the profile (their endpoints don't return it).\n\tupdateEmail: (email: string) => Promise<void>;\n\tupdatePhone: (phone: string) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n}\n\nexport function useProfile(client?: AuthClient): IUseProfileReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useProfile');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function mutate<T>(op: () => Promise<T>): Promise<T> {\n\t\terror.value = null;\n\t\ttry {\n\t\t\treturn await op();\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t}\n\t}\n\n\tfunction updateProfile(input: IUpdateProfileInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updateProfile(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updatePreferences(input: IUpdatePreferencesInput) {\n\t\treturn mutate(async () => {\n\t\t\tconst { result } = await auth.updatePreferences(input);\n\t\t\tuser.value = result.user;\n\t\t\treturn result.user;\n\t\t});\n\t}\n\n\tfunction updateEmail(email: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updateEmail(email);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tfunction updatePhone(phone: string) {\n\t\treturn mutate(async () => {\n\t\t\tawait auth.updatePhone(phone);\n\t\t\tawait refresh();\n\t\t});\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { user, refresh, updateProfile, updatePreferences, updateEmail, updatePhone, isLoading, error };\n}\n","import type { AuthClient, IRegisterInput, IRegisterResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\nimport { persistToken } from '../storage';\n\nexport interface IUseRegisterReturn {\n\tregister: (input: IRegisterInput) => Promise<IRegisterResult>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IRegisterResult | null>;\n}\n\nexport function useRegister(client?: AuthClient): IUseRegisterReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useRegister');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IRegisterResult | null>(null);\n\n\tasync function register(input: IRegisterInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.register(input);\n\t\t\tauth.setAccessToken(result.tokens.access);\n\t\t\tpersistToken(result.tokens.access);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { register, isLoading, error, data };\n}\n","import type { AuthClient, IResetPasswordInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseResetPasswordReturn {\n\tresetPassword: (input: IResetPasswordInput) => Promise<void>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdone: Ref<boolean>;\n}\n\nexport function useResetPassword(client?: AuthClient): IUseResetPasswordReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useResetPassword');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst done = ref(false);\n\n\tasync function resetPassword(input: IResetPasswordInput) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.resetPassword(input);\n\t\t\tdone.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { resetPassword, isLoading, error, done };\n}\n","import type { AuthClient, IUserDTO } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\nimport { clearToken, readToken } from '../storage';\n\nexport interface IUseSessionReturn {\n\tuser: Ref<IUserDTO | null>;\n\tisLoading: Ref<boolean>;\n\tisAuthenticated: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tlogout: (refreshToken?: string) => Promise<void>;\n}\n\nexport function useSession(client?: AuthClient): IUseSessionReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSession');\n\tconst user = ref<IUserDTO | null>(null);\n\tconst isLoading = ref(true);\n\tconst isAuthenticated = ref(false);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.getUser({ bust: opts?.force });\n\t\t\tuser.value = result.user;\n\t\t\tisAuthenticated.value = true;\n\t\t} catch {\n\t\t\tuser.value = null;\n\t\t\tisAuthenticated.value = false;\n\t\t\tauth.setAccessToken(undefined);\n\t\t\tclearToken();\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function logout(refreshToken?: string) {\n\t\ttry {\n\t\t\tawait auth.logout(refreshToken);\n\t\t} catch {\n\t\t\t// Session is being torn down regardless of server response.\n\t\t}\n\t\tauth.setAccessToken(undefined);\n\t\tclearToken();\n\t\tuser.value = null;\n\t\tisAuthenticated.value = false;\n\t}\n\n\tconst token = readToken();\n\tif (token) auth.setAccessToken(token);\n\tonMounted(() => void refresh());\n\n\treturn { user, isLoading, isAuthenticated, refresh, logout };\n}\n","import type { AuthClient, ILoginEventDTO, IGetLoginHistoryInput } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseLoginHistoryReturn {\n\tevents: Ref<ILoginEventDTO[]>;\n\tisLoading: Ref<boolean>;\n\tisLoadingMore: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\thasMore: Ref<boolean>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\tloadMore: () => Promise<void>;\n}\n\n// The caller's own login attempts, newest first, keyset-paginated. Same contract\n// as react-auth's useLoginHistory (and vue-audit's useAuditEvents). Unlike React,\n// a composable body runs once, so filters need no memoization — they're captured\n// at call time.\nexport function useLoginHistory(rawFilters?: IGetLoginHistoryInput): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclient: AuthClient | undefined,\n\trawFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn;\nexport function useLoginHistory(\n\tclientOrFilters?: AuthClient | IGetLoginHistoryInput,\n\tmaybeFilters?: IGetLoginHistoryInput,\n): IUseLoginHistoryReturn {\n\t// The AuthClient isn't reliably an instanceof across bundle boundaries, so\n\t// detect the client arg structurally (it has getLoginHistory) rather than\n\t// by prototype.\n\tconst firstIsClient =\n\t\tclientOrFilters === undefined ||\n\t\ttypeof (clientOrFilters as AuthClient).getLoginHistory === 'function';\n\tconst explicit = firstIsClient ? (clientOrFilters as AuthClient | undefined) : undefined;\n\tconst filters = (firstIsClient ? maybeFilters : (clientOrFilters as IGetLoginHistoryInput)) ?? {};\n\tconst auth = useFonderieSubClient(explicit, (c) => c.auth, 'useLoginHistory');\n\n\tconst events = ref<ILoginEventDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst isLoadingMore = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst hasMore = ref(false);\n\tlet cursor: string | null = null;\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory(filters, { bust: opts?.force });\n\t\t\tevents.value = result.events;\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function loadMore() {\n\t\tif (!cursor || isLoadingMore.value) return;\n\t\tisLoadingMore.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.getLoginHistory({ ...filters, cursor });\n\t\t\tevents.value = [...events.value, ...result.events];\n\t\t\tcursor = result.nextCursor;\n\t\t\thasMore.value = result.nextCursor !== null;\n\t\t} catch (err) {\n\t\t\terror.value =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t} finally {\n\t\t\tisLoadingMore.value = false;\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { events, isLoading, isLoadingMore, error, hasMore, refresh, loadMore };\n}\n","import type { AuthClient, ISessionDTO } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseSessionsReturn {\n\tsessions: Ref<ISessionDTO[]>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\trefresh: (opts?: { force?: boolean }) => Promise<void>;\n\t// Revoke one session. Optimistically removes it; refetches on failure.\n\tterminate: (id: string) => Promise<void>;\n\t// Revoke every session except the current one.\n\tterminateOthers: () => Promise<void>;\n}\n\nfunction toApiError(err: unknown): FonderieApiError {\n\treturn err instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n}\n\n// The caller's live sessions (one flagged `current`) plus the terminate actions.\n// Same contract as react-auth's useSessions.\nexport function useSessions(client?: AuthClient): IUseSessionsReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useSessions');\n\tconst sessions = ref<ISessionDTO[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | null>(null);\n\n\tasync function refresh(opts?: { force?: boolean }) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.listSessions({ bust: opts?.force });\n\t\t\tsessions.value = result.sessions;\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function terminate(id: string) {\n\t\tconst prev = sessions.value;\n\t\tsessions.value = prev.filter((row) => row.id !== id); // optimistic\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateSession(id);\n\t\t} catch (err) {\n\t\t\tsessions.value = prev; // roll back the optimistic removal\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tasync function terminateOthers() {\n\t\terror.value = null;\n\t\ttry {\n\t\t\tawait auth.terminateOtherSessions();\n\t\t\t// The server is the source of truth for which survived — refetch (force)\n\t\t\t// rather than trust a local \"keep current\" guess.\n\t\t\tawait refresh({ force: true });\n\t\t} catch (err) {\n\t\t\terror.value = toApiError(err);\n\t\t\tthrow toApiError(err);\n\t\t}\n\t}\n\n\tonMounted(() => void refresh());\n\n\treturn { sessions, isLoading, error, refresh, terminate, terminateOthers };\n}\n","import type { AuthClient, IVerifyEmailResult } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseVerifyEmailReturn {\n\tverifyEmail: (pin: string) => Promise<IVerifyEmailResult>;\n\tresend: () => Promise<void>;\n\tresent: Ref<boolean>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\tdata: Ref<IVerifyEmailResult | null>;\n}\n\nexport function useVerifyEmail(client?: AuthClient): IUseVerifyEmailReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useVerifyEmail');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst data = ref<IVerifyEmailResult | null>(null);\n\tconst resent = ref(false);\n\n\t// Re-sends the verification email — the other half of the same lifecycle,\n\t// so one composable owns both and screens don't split loading/error handling.\n\tasync function resend() {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\tresent.value = false;\n\t\ttry {\n\t\t\tawait auth.sendVerificationEmail();\n\t\t\tresent.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\tasync function verifyEmail(pin: string) {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\ttry {\n\t\t\tconst { result } = await auth.verifyEmail(pin);\n\t\t\tdata.value = result;\n\t\t\treturn result;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t}\n\n\treturn { verifyEmail, resend, resent, isLoading, error, data };\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { onMounted, ref } from 'vue';\n\nexport interface IUseAuthProvidersReturn {\n\t/** Sign-in methods this deployment can honour, e.g. ['email','google']. */\n\tproviders: Ref<string[]>;\n\t/** The common case: should this button be rendered at all? */\n\thas: (provider: string) => boolean;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | Error | null>;\n\trefresh: () => Promise<void>;\n}\n\n// Ask the API which sign-in methods it can honour, and render buttons from\n// that — never from a build-time flag. A flag stores the same fact the API\n// already holds and lets the two disagree; the failure is a user committing to\n// a redirect and landing on the provider's error page, which this app cannot\n// explain. Same contract as react-auth's useAuthProviders.\n//\n// Starts EMPTY rather than optimistic: a brief moment with no social buttons is\n// invisible, a button that appears and then fails is not.\nexport function useAuthProviders(client?: AuthClient): IUseAuthProvidersReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useAuthProviders');\n\tconst providers = ref<string[]>([]);\n\tconst isLoading = ref(true);\n\tconst error = ref<FonderieApiError | Error | null>(null);\n\n\tconst refresh = async (): Promise<void> => {\n\t\tisLoading.value = true;\n\t\ttry {\n\t\t\tconst { result } = await auth.providers();\n\t\t\tproviders.value = result.providers;\n\t\t\terror.value = null;\n\t\t} catch (err) {\n\t\t\t// Degrade to email-only rather than guessing: an unreachable API is\n\t\t\t// not evidence that a provider works.\n\t\t\tproviders.value = [];\n\t\t\terror.value = err instanceof Error ? err : new Error(String(err));\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t};\n\n\tonMounted(() => {\n\t\tvoid refresh();\n\t});\n\n\treturn {\n\t\tproviders,\n\t\thas: (provider: string) => providers.value.includes(provider),\n\t\tisLoading,\n\t\terror,\n\t\trefresh,\n\t};\n}\n","import type { AuthClient } from '@fonderie/client';\nimport { FonderieApiError } from '@fonderie/client';\nimport { useFonderieSubClient } from '@fonderie/vue';\nimport type { Ref } from 'vue';\nimport { ref } from 'vue';\n\nexport interface IUseUnlinkOauthReturn {\n\tunlinkOauth: (provider: string) => Promise<void>;\n\tunlinked: Ref<boolean>;\n\tisLoading: Ref<boolean>;\n\terror: Ref<FonderieApiError | null>;\n\t// True when the server refused because the account has no password — the one\n\t// failure a settings screen should handle rather than just display, by\n\t// sending the user to set a password first. A flag so screens don't have to\n\t// match on the error's reason string.\n\trequiresPassword: Ref<boolean>;\n}\n\n/**\n * Remove the OAuth provider linked to the signed-in account.\n *\n * Prefer gating the control on `user.hasPassword` so the case is never reached:\n * an account created BY the provider has no other credential, and unlinking it\n * would be account deletion. The server refuses regardless (409), which is what\n * `requiresPassword` reports.\n */\nexport function useUnlinkOauth(client?: AuthClient): IUseUnlinkOauthReturn {\n\tconst auth = useFonderieSubClient(client, (c) => c.auth, 'useUnlinkOauth');\n\tconst isLoading = ref(false);\n\tconst error = ref<FonderieApiError | null>(null);\n\tconst unlinked = ref(false);\n\tconst requiresPassword = ref(false);\n\n\tconst unlinkOauth = async (provider: string): Promise<void> => {\n\t\tisLoading.value = true;\n\t\terror.value = null;\n\t\trequiresPassword.value = false;\n\t\ttry {\n\t\t\tawait auth.unlinkOauth(provider);\n\t\t\tunlinked.value = true;\n\t\t} catch (err) {\n\t\t\tconst apiError =\n\t\t\t\terr instanceof FonderieApiError ? err : new FonderieApiError('unknown', String(err), 0);\n\t\t\terror.value = apiError;\n\t\t\trequiresPassword.value = apiError.reason === 'PASSWORD_REQUIRED';\n\t\t\tthrow apiError;\n\t\t} finally {\n\t\t\tisLoading.value = false;\n\t\t}\n\t};\n\n\tretur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B;AACzE,QAAM,YAAYC,MAAI,KAAK;AAC3B,QAAM,QAAQA,MAA6B,IAAI;AAC/C,QAAM,WAAWA,MAAI,KAAK;AAC1B,QAAM,mBAAmBA,MAAI,KAAK;AAElC,QAAM,cAAc,OAAO,aAAoC;AAC9D,cAAU,QAAQ;AAClB,UAAM,QAAQ;AACd,qBAAiB,QAAQ;AACzB,QAAI;AACH,YAAM,KAAK,YAAY,QAAQ;AAC/B,eAAS,QAAQ;AAAA,IAClB,SAAS,KAAK;AACb,YAAM,WACL,eAAeF,qBAAmB,MAAM,IAAIA,mBAAiB,WAAW,OAAO,GAAG,GAAG,CAAC;AACvF,YAAM,QAAQ;AACd,uBAAiB,QAAQ,SAAS,WAAW;AAC7C,YAAM;AAAA,IACP,UAAE;AACD,gBAAU,QAAQ;AAAA,IACnB;AAAA,EACD;AAEA,SAAO,EAAE,aAAa,UAAU,WAAW,OAAO,iBAAiB;AACpE;","names":["FonderieApiError","isMfaRequired","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","ref","FonderieApiError","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","onMounted","ref","useFonderieSubClient","ref","onMounted","FonderieApiError","useFonderieSubClient","onMounted","ref","FonderieApiError","useFonderieSubClient","onMounted","ref","FonderieApiError","useFonderieSubClient","ref","useFonderieSubClient","onMounted","ref","FonderieApiError","useFonderieSubClient","ref"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fonderie/vue-auth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "Vue composables for Fonderie auth \u2014 thin bindings over @fonderie/client.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fonderiejs",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
"vue": ">=3.3.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/node": "^26.
|
|
44
|
+
"@types/node": "^26.6.1",
|
|
45
45
|
"tsup": "^8.5.1",
|
|
46
46
|
"tsx": "^4.23.13",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
|
-
"vue": "^3.5.
|
|
48
|
+
"vue": "^3.5.43"
|
|
49
49
|
},
|
|
50
50
|
"publishConfig": {
|
|
51
51
|
"access": "public"
|