@meeovi/auth 1.0.2 → 1.0.4
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/dist/config.d.ts +8 -0
- package/dist/config.js +12 -0
- package/dist/framework.d.ts +17 -0
- package/dist/framework.js +13 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +9 -0
- package/dist/middleware/redirect.global.d.ts +1 -0
- package/dist/middleware/redirect.global.js +6 -0
- package/dist/middleware/seller.d.ts +2 -0
- package/dist/middleware/seller.js +6 -0
- package/dist/middleware/session.d.ts +5 -0
- package/dist/middleware/session.js +10 -0
- package/dist/plugins.d.ts +5 -0
- package/dist/plugins.js +18 -0
- package/dist/providers/better-auth.d.ts +1 -0
- package/dist/providers/better-auth.js +84 -0
- package/dist/registry.d.ts +4 -0
- package/dist/registry.js +17 -0
- package/dist/types.d.ts +29 -0
- package/dist/types.js +1 -0
- package/dist/useAuth.d.ts +36 -0
- package/dist/useAuth.js +88 -0
- package/package.json +25 -6
- package/src/index.ts +10 -0
- package/src/middleware/redirect.global.ts +7 -0
- package/src/middleware/seller.ts +8 -0
- package/src/middleware/session.ts +18 -0
- package/src/plugins.ts +1 -1
- package/tsconfig.json +15 -0
- package/index.ts +0 -1
package/dist/config.d.ts
ADDED
package/dist/config.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
let config = {
|
|
2
|
+
authProvider: 'better-auth',
|
|
3
|
+
authUrl: '',
|
|
4
|
+
sessionCookieName: 'session',
|
|
5
|
+
baseUrl: undefined
|
|
6
|
+
};
|
|
7
|
+
export function setAuthConfig(newConfig) {
|
|
8
|
+
config = { ...config, ...newConfig };
|
|
9
|
+
}
|
|
10
|
+
export function getAuthConfig() {
|
|
11
|
+
return config;
|
|
12
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface FrameworkContext {
|
|
2
|
+
getRequestURL?(): string;
|
|
3
|
+
getRequestHeaders?(): Record<string, string>;
|
|
4
|
+
getConfig?(): any;
|
|
5
|
+
reloadApp?(): void;
|
|
6
|
+
state?<T>(key: string, init: () => T): {
|
|
7
|
+
value: T;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Frameworks (Nuxt, React, etc.) call this once during initialization.
|
|
12
|
+
*/
|
|
13
|
+
export declare function setFrameworkContext(newCtx: FrameworkContext): void;
|
|
14
|
+
/**
|
|
15
|
+
* Auth providers use this to access framework-specific helpers.
|
|
16
|
+
*/
|
|
17
|
+
export declare function getFrameworkContext(): FrameworkContext;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
let ctx = {};
|
|
2
|
+
/**
|
|
3
|
+
* Frameworks (Nuxt, React, etc.) call this once during initialization.
|
|
4
|
+
*/
|
|
5
|
+
export function setFrameworkContext(newCtx) {
|
|
6
|
+
ctx = { ...ctx, ...newCtx };
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Auth providers use this to access framework-specific helpers.
|
|
10
|
+
*/
|
|
11
|
+
export function getFrameworkContext() {
|
|
12
|
+
return ctx;
|
|
13
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './useAuth';
|
|
2
|
+
export * from "better-auth";
|
|
3
|
+
export * from "@better-auth/cli";
|
|
4
|
+
export * from "@better-auth/oauth-provider";
|
|
5
|
+
export * from "@better-auth/passkey";
|
|
6
|
+
export * from "@better-auth/scim";
|
|
7
|
+
export * from "@better-auth/sso";
|
|
8
|
+
export * from "@better-auth/stripe";
|
|
9
|
+
export * as polarSh from "@polar-sh/better-auth";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './useAuth';
|
|
2
|
+
export * from "better-auth";
|
|
3
|
+
export * from "@better-auth/cli";
|
|
4
|
+
export * from "@better-auth/oauth-provider";
|
|
5
|
+
export * from "@better-auth/passkey";
|
|
6
|
+
export * from "@better-auth/scim";
|
|
7
|
+
export * from "@better-auth/sso";
|
|
8
|
+
export * from "@better-auth/stripe";
|
|
9
|
+
export * as polarSh from "@polar-sh/better-auth";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function normalizeTrailingSlash(path: string): string | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function ensureSession(getCookie, setCookie, generateId) {
|
|
2
|
+
const session = getCookie('session');
|
|
3
|
+
if (!session) {
|
|
4
|
+
const newSession = {
|
|
5
|
+
id: generateId(),
|
|
6
|
+
date_created: new Date().toISOString(),
|
|
7
|
+
};
|
|
8
|
+
setCookie('session', JSON.stringify(newSession));
|
|
9
|
+
}
|
|
10
|
+
}
|
package/dist/plugins.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { stripeClient } from '@better-auth/stripe/client';
|
|
2
|
+
import { polarClient } from '@polar-sh/better-auth';
|
|
3
|
+
import { adminClient, inferAdditionalFields } from 'better-auth/client/plugins';
|
|
4
|
+
export function getAuthPlugins(opts = {}) {
|
|
5
|
+
const { subscription = true } = opts;
|
|
6
|
+
return [
|
|
7
|
+
inferAdditionalFields({
|
|
8
|
+
user: {
|
|
9
|
+
polarCustomerId: {
|
|
10
|
+
type: 'string'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}),
|
|
14
|
+
adminClient(),
|
|
15
|
+
polarClient(),
|
|
16
|
+
stripeClient({ subscription })
|
|
17
|
+
];
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as BetterAuth from 'better-auth';
|
|
2
|
+
import { registerAuthProvider } from '../registry';
|
|
3
|
+
import { getAuthConfig } from '../config';
|
|
4
|
+
import { getFrameworkContext } from '../framework';
|
|
5
|
+
// Create a single shared Better Auth client instance
|
|
6
|
+
let client = null;
|
|
7
|
+
function resolveClientFactory() {
|
|
8
|
+
return BetterAuth.Client ?? BetterAuth.default ?? BetterAuth;
|
|
9
|
+
}
|
|
10
|
+
function getClient() {
|
|
11
|
+
if (client)
|
|
12
|
+
return client;
|
|
13
|
+
const config = getAuthConfig();
|
|
14
|
+
const ctx = getFrameworkContext();
|
|
15
|
+
const Client = resolveClientFactory();
|
|
16
|
+
client = Client({
|
|
17
|
+
baseURL: config.baseUrl,
|
|
18
|
+
fetch: async (url, options = {}) => {
|
|
19
|
+
// Framework‑agnostic request wrapper
|
|
20
|
+
const baseHeaders = ctx.getRequestHeaders?.() || {};
|
|
21
|
+
let optionHeaders = {};
|
|
22
|
+
if (options.headers instanceof Headers) {
|
|
23
|
+
options.headers.forEach((value, key) => {
|
|
24
|
+
optionHeaders[key] = value;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
else if (Array.isArray(options.headers)) {
|
|
28
|
+
for (const [k, v] of options.headers) {
|
|
29
|
+
optionHeaders[k] = v;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
else if (typeof options.headers === 'object' && options.headers !== null) {
|
|
33
|
+
optionHeaders = options.headers;
|
|
34
|
+
}
|
|
35
|
+
const headers = {
|
|
36
|
+
...baseHeaders,
|
|
37
|
+
...optionHeaders
|
|
38
|
+
};
|
|
39
|
+
return fetch(url, { ...options, headers });
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return client;
|
|
43
|
+
}
|
|
44
|
+
const BetterAuthProvider = {
|
|
45
|
+
async login(credentials) {
|
|
46
|
+
const client = getClient();
|
|
47
|
+
const result = await client.signIn(credentials);
|
|
48
|
+
if (result.error) {
|
|
49
|
+
throw new Error(result.error.message || 'Login failed');
|
|
50
|
+
}
|
|
51
|
+
return result.data;
|
|
52
|
+
},
|
|
53
|
+
async logout() {
|
|
54
|
+
const client = getClient();
|
|
55
|
+
await client.signOut();
|
|
56
|
+
const ctx = getFrameworkContext();
|
|
57
|
+
ctx.reloadApp?.();
|
|
58
|
+
},
|
|
59
|
+
async session() {
|
|
60
|
+
const client = getClient();
|
|
61
|
+
const result = await client.session();
|
|
62
|
+
if (result.error) {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
return result.data;
|
|
66
|
+
},
|
|
67
|
+
async register(data) {
|
|
68
|
+
const client = getClient();
|
|
69
|
+
const result = await client.signUp(data);
|
|
70
|
+
if (result.error) {
|
|
71
|
+
throw new Error(result.error.message || 'Registration failed');
|
|
72
|
+
}
|
|
73
|
+
return result.data;
|
|
74
|
+
},
|
|
75
|
+
async refresh() {
|
|
76
|
+
const client = getClient();
|
|
77
|
+
const result = await client.refresh();
|
|
78
|
+
if (result.error) {
|
|
79
|
+
throw new Error(result.error.message || 'Session refresh failed');
|
|
80
|
+
}
|
|
81
|
+
return result.data;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
registerAuthProvider('better-auth', BetterAuthProvider);
|
package/dist/registry.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const providers = {};
|
|
2
|
+
let activeProvider = null;
|
|
3
|
+
export function registerAuthProvider(name, provider) {
|
|
4
|
+
providers[name] = provider;
|
|
5
|
+
}
|
|
6
|
+
export function setActiveAuthProvider(name) {
|
|
7
|
+
if (!providers[name]) {
|
|
8
|
+
throw new Error(`Auth provider "${name}" is not registered`);
|
|
9
|
+
}
|
|
10
|
+
activeProvider = name;
|
|
11
|
+
}
|
|
12
|
+
export function getAuthProvider() {
|
|
13
|
+
if (!activeProvider) {
|
|
14
|
+
throw new Error('No active auth provider has been set');
|
|
15
|
+
}
|
|
16
|
+
return providers[activeProvider];
|
|
17
|
+
}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface AuthSession {
|
|
2
|
+
user: {
|
|
3
|
+
id: string;
|
|
4
|
+
email?: string;
|
|
5
|
+
name?: string;
|
|
6
|
+
avatarUrl?: string;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
expiresAt?: string;
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}
|
|
12
|
+
export interface AuthCredentials {
|
|
13
|
+
email: string;
|
|
14
|
+
password: string;
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export interface AuthRegistration {
|
|
18
|
+
email: string;
|
|
19
|
+
password: string;
|
|
20
|
+
name?: string;
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}
|
|
23
|
+
export interface AuthProvider {
|
|
24
|
+
login(credentials: AuthCredentials): Promise<AuthSession>;
|
|
25
|
+
logout(): Promise<void>;
|
|
26
|
+
session(): Promise<AuthSession | null>;
|
|
27
|
+
register?(data: AuthRegistration): Promise<AuthSession>;
|
|
28
|
+
refresh?(): Promise<AuthSession>;
|
|
29
|
+
}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { Subscription } from '@better-auth/stripe';
|
|
2
|
+
export type UseAuthOptions = {
|
|
3
|
+
/** An existing auth client. If provided, it's used as-is. */
|
|
4
|
+
client?: any;
|
|
5
|
+
/** Base URL for the auth client if creating one. */
|
|
6
|
+
baseURL?: string;
|
|
7
|
+
/** Optional headers to send with requests. */
|
|
8
|
+
headers?: Record<string, string>;
|
|
9
|
+
/** Payment provider: 'stripe' or 'polar'. If omitted, 'stripe' is assumed. */
|
|
10
|
+
payment?: 'stripe' | 'polar';
|
|
11
|
+
/** Optional app-level reload/redirect function (framework-specific). */
|
|
12
|
+
reload?: (opts: {
|
|
13
|
+
path?: string;
|
|
14
|
+
}) => Promise<void>;
|
|
15
|
+
};
|
|
16
|
+
export declare function useAuth(options?: UseAuthOptions): {
|
|
17
|
+
session: null;
|
|
18
|
+
user: null;
|
|
19
|
+
subscription: any;
|
|
20
|
+
subscriptions: Subscription[];
|
|
21
|
+
loggedIn: () => boolean;
|
|
22
|
+
activeStripeSubscription: () => Subscription | undefined;
|
|
23
|
+
activePolarSubscriptions: () => import("@polar-sh/sdk/models/components/customerstatesubscription.js").CustomerStateSubscription[] | undefined;
|
|
24
|
+
signIn: any;
|
|
25
|
+
signUp: any;
|
|
26
|
+
forgetPassword: any;
|
|
27
|
+
resetPassword: any;
|
|
28
|
+
sendVerificationEmail: any;
|
|
29
|
+
errorCodes: any;
|
|
30
|
+
signOut({ redirectTo }?: {
|
|
31
|
+
redirectTo?: string;
|
|
32
|
+
}): Promise<void>;
|
|
33
|
+
fetchSession: () => Promise<any>;
|
|
34
|
+
payment: "stripe" | "polar";
|
|
35
|
+
client: any;
|
|
36
|
+
};
|
package/dist/useAuth.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { createAuthClient } from 'better-auth/client';
|
|
2
|
+
import { getAuthPlugins } from './plugins';
|
|
3
|
+
export function useAuth(options = {}) {
|
|
4
|
+
const { client: providedClient, baseURL, headers, payment = 'stripe', reload } = options;
|
|
5
|
+
const client = providedClient || createAuthClient({
|
|
6
|
+
baseURL: baseURL || undefined,
|
|
7
|
+
fetchOptions: {
|
|
8
|
+
headers
|
|
9
|
+
},
|
|
10
|
+
plugins: getAuthPlugins({ subscription: true })
|
|
11
|
+
});
|
|
12
|
+
let session = null;
|
|
13
|
+
let user = null;
|
|
14
|
+
let subscriptions = [];
|
|
15
|
+
let polarState = null;
|
|
16
|
+
let sessionFetching = false;
|
|
17
|
+
const fetchSession = async () => {
|
|
18
|
+
if (sessionFetching)
|
|
19
|
+
return;
|
|
20
|
+
sessionFetching = true;
|
|
21
|
+
const { data } = await client.getSession();
|
|
22
|
+
session = data?.session || null;
|
|
23
|
+
const userDefaults = {
|
|
24
|
+
image: null,
|
|
25
|
+
role: null,
|
|
26
|
+
banReason: null,
|
|
27
|
+
banned: null,
|
|
28
|
+
banExpires: null,
|
|
29
|
+
stripeCustomerId: null
|
|
30
|
+
};
|
|
31
|
+
user = data?.user ? Object.assign({}, userDefaults, data.user) : null;
|
|
32
|
+
subscriptions = [];
|
|
33
|
+
if (user) {
|
|
34
|
+
if (payment == 'stripe') {
|
|
35
|
+
const { data: subscriptionData } = await client.subscription.list();
|
|
36
|
+
subscriptions = subscriptionData || [];
|
|
37
|
+
}
|
|
38
|
+
else if (payment == 'polar') {
|
|
39
|
+
const { data: customerState } = await client.customer.state();
|
|
40
|
+
polarState = customerState;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
sessionFetching = false;
|
|
44
|
+
return data;
|
|
45
|
+
};
|
|
46
|
+
if (client?.$store?.listen) {
|
|
47
|
+
client.$store.listen('$sessionSignal', async (signal) => {
|
|
48
|
+
if (!signal)
|
|
49
|
+
return;
|
|
50
|
+
await fetchSession();
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
session,
|
|
55
|
+
user,
|
|
56
|
+
subscription: client.subscription,
|
|
57
|
+
subscriptions,
|
|
58
|
+
loggedIn: () => !!session,
|
|
59
|
+
activeStripeSubscription: () => {
|
|
60
|
+
return subscriptions.find((sub) => sub.status === 'active' || sub.status === 'trialing');
|
|
61
|
+
},
|
|
62
|
+
activePolarSubscriptions: () => {
|
|
63
|
+
return polarState?.activeSubscriptions;
|
|
64
|
+
},
|
|
65
|
+
signIn: client.signIn,
|
|
66
|
+
signUp: client.signUp,
|
|
67
|
+
forgetPassword: client.forgetPassword,
|
|
68
|
+
resetPassword: client.resetPassword,
|
|
69
|
+
sendVerificationEmail: client.sendVerificationEmail,
|
|
70
|
+
errorCodes: client.$ERROR_CODES,
|
|
71
|
+
async signOut({ redirectTo } = {}) {
|
|
72
|
+
await client.signOut({
|
|
73
|
+
fetchOptions: {
|
|
74
|
+
onSuccess: async () => {
|
|
75
|
+
session = null;
|
|
76
|
+
user = null;
|
|
77
|
+
if (redirectTo && typeof reload === 'function') {
|
|
78
|
+
await reload({ path: redirectTo.toString() });
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
},
|
|
84
|
+
fetchSession,
|
|
85
|
+
payment,
|
|
86
|
+
client
|
|
87
|
+
};
|
|
88
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meeovi/auth",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Authentication for M Framework.",
|
|
5
|
-
"license": "
|
|
6
|
-
"author": "",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Meeovi",
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"module": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"better-auth",
|
|
18
|
+
"authentication",
|
|
19
|
+
"auth",
|
|
20
|
+
"typescript",
|
|
21
|
+
"vue",
|
|
22
|
+
"m-framework"
|
|
23
|
+
],
|
|
9
24
|
"scripts": {
|
|
10
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
25
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
26
|
+
"build": "tsc -p tsconfig.json"
|
|
11
27
|
},
|
|
12
28
|
"dependencies": {
|
|
13
29
|
"@better-auth/cli": "^1.4.10",
|
|
@@ -19,12 +35,15 @@
|
|
|
19
35
|
"@polar-sh/better-auth": "^1.6.3",
|
|
20
36
|
"better-auth": "^1.4.12",
|
|
21
37
|
"mjml": "^4.18.0",
|
|
38
|
+
"typescript": "^5.9.3",
|
|
22
39
|
"uncrypto": "^0.1.3",
|
|
23
40
|
"uuid": "^13.0.0",
|
|
24
41
|
"vue": "^3.5.27",
|
|
25
42
|
"vue-router": "^4.6.4"
|
|
26
43
|
},
|
|
27
44
|
"devDependencies": {
|
|
45
|
+
"@types/mjml": "^4.7.4",
|
|
46
|
+
"@types/node": "^25.0.9",
|
|
28
47
|
"@types/uuid": "^10.0.0"
|
|
29
48
|
}
|
|
30
49
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from './useAuth'
|
|
2
|
+
|
|
3
|
+
export * from "better-auth";
|
|
4
|
+
export * from "@better-auth/cli";
|
|
5
|
+
export * from "@better-auth/oauth-provider";
|
|
6
|
+
export * from "@better-auth/passkey";
|
|
7
|
+
export * from "@better-auth/scim";
|
|
8
|
+
export * from "@better-auth/sso";
|
|
9
|
+
export * from "@better-auth/stripe";
|
|
10
|
+
export * as polarSh from "@polar-sh/better-auth";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
|
|
2
|
+
export interface Session {
|
|
3
|
+
id: string;
|
|
4
|
+
date_created: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function ensureSession(getCookie: (name: string) => any, setCookie: (name: string, value: string) => void, generateId: () => string) {
|
|
8
|
+
const session = getCookie('session');
|
|
9
|
+
|
|
10
|
+
if (!session) {
|
|
11
|
+
const newSession: Session = {
|
|
12
|
+
id: generateId(),
|
|
13
|
+
date_created: new Date().toISOString(),
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
setCookie('session', JSON.stringify(newSession));
|
|
17
|
+
}
|
|
18
|
+
}
|
package/src/plugins.ts
CHANGED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"declaration": true,
|
|
4
|
+
"emitDeclarationOnly": false,
|
|
5
|
+
"outDir": "dist",
|
|
6
|
+
"moduleResolution": "bundler",
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"target": "ESNext",
|
|
9
|
+
"strict": true,
|
|
10
|
+
"jsx": "react-jsx",
|
|
11
|
+
"skipLibCheck": true,
|
|
12
|
+
"noEmitOnError": false
|
|
13
|
+
},
|
|
14
|
+
"include": ["src"]
|
|
15
|
+
}
|
package/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './src/useAuth'
|