better-auth 1.2.4-beta.10 → 1.2.4-beta.12
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/plugins/admin/index.cjs +1 -1
- package/dist/plugins/admin/index.mjs +1 -1
- package/dist/plugins/index.cjs +1 -1
- package/dist/plugins/index.mjs +1 -1
- package/dist/shared/{better-auth.CKKeYM2g.mjs → better-auth.BH6IWaNB.mjs} +1 -1
- package/dist/shared/{better-auth.BB4ttfim.cjs → better-auth.CR_ASYNx.cjs} +1 -1
- package/package.json +1 -1
package/dist/plugins/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@ const account = require('../shared/better-auth.GVCiTzec.cjs');
|
|
|
8
8
|
const plugins_magicLink_index = require('./magic-link/index.cjs');
|
|
9
9
|
const plugins_phoneNumber_index = require('./phone-number/index.cjs');
|
|
10
10
|
const plugins_anonymous_index = require('./anonymous/index.cjs');
|
|
11
|
-
const admin = require('../shared/better-auth.
|
|
11
|
+
const admin = require('../shared/better-auth.CR_ASYNx.cjs');
|
|
12
12
|
const plugins_genericOauth_index = require('./generic-oauth/index.cjs');
|
|
13
13
|
const plugins_jwt_index = require('./jwt/index.cjs');
|
|
14
14
|
const plugins_multiSession_index = require('./multi-session/index.cjs');
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ export { H as HIDE_METADATA, N as optionsMiddleware } from '../shared/better-aut
|
|
|
7
7
|
export { magicLink } from './magic-link/index.mjs';
|
|
8
8
|
export { phoneNumber } from './phone-number/index.mjs';
|
|
9
9
|
export { anonymous } from './anonymous/index.mjs';
|
|
10
|
-
export { a as admin } from '../shared/better-auth.
|
|
10
|
+
export { a as admin } from '../shared/better-auth.BH6IWaNB.mjs';
|
|
11
11
|
export { genericOAuth } from './generic-oauth/index.mjs';
|
|
12
12
|
export { getJwtToken, jwt } from './jwt/index.mjs';
|
|
13
13
|
export { multiSession } from './multi-session/index.mjs';
|
|
@@ -49,7 +49,7 @@ const admin = (options) => {
|
|
|
49
49
|
};
|
|
50
50
|
const adminMiddleware = createAuthMiddleware(async (ctx) => {
|
|
51
51
|
const session = await getSessionFromCtx(ctx);
|
|
52
|
-
if (
|
|
52
|
+
if (!session) {
|
|
53
53
|
throw new APIError("UNAUTHORIZED");
|
|
54
54
|
}
|
|
55
55
|
return {
|
|
@@ -51,7 +51,7 @@ const admin = (options) => {
|
|
|
51
51
|
};
|
|
52
52
|
const adminMiddleware = account.createAuthMiddleware(async (ctx) => {
|
|
53
53
|
const session = await account.getSessionFromCtx(ctx);
|
|
54
|
-
if (
|
|
54
|
+
if (!session) {
|
|
55
55
|
throw new betterCall.APIError("UNAUTHORIZED");
|
|
56
56
|
}
|
|
57
57
|
return {
|