better-auth 1.0.0 → 1.0.2
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 +1 -4
- package/dist/client/plugins.d.cts +2 -2
- package/dist/client/plugins.d.ts +2 -2
- package/dist/{index-qfU3ue1P.d.ts → index-CX-Hopog.d.ts} +4 -0
- package/dist/{index-ySD-VQEH.d.cts → index-x5P1hIyV.d.cts} +4 -0
- package/dist/node.cjs +1 -1
- package/dist/node.d.cts +3 -1
- package/dist/node.d.ts +3 -1
- package/dist/plugins.cjs +4 -4
- package/dist/plugins.d.cts +1 -1
- package/dist/plugins.d.ts +1 -1
- package/dist/plugins.js +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,10 +23,7 @@
|
|
|
23
23
|
</p>
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
> [!WARNING]
|
|
27
|
-
> *🚧 **Note:** This project is in beta and not yet recommended for production use. Features and APIs are still evolving and may change frequently. For more details, check out our [roadmap](https://github.com/orgs/better-auth/projects/2) to the v1 stable release.
|
|
28
26
|
|
|
29
|
-
Better Auth is framework-agnostic authentication (and authorization) library for TypeScript. It provides a comprehensive set of features out of the box and includes a plugin ecosystem that simplifies adding advanced functionalities with minimal code in short amount of time. Whether you need 2FA, multi-tenant support, or other complex features. It lets you focus on building your actual application instead of reinventing the wheel.
|
|
30
27
|
|
|
31
28
|
## Getting Started
|
|
32
29
|
|
|
@@ -34,4 +31,4 @@ Better Auth is framework-agnostic authentication (and authorization) library for
|
|
|
34
31
|
pnpm install better-auth
|
|
35
32
|
```
|
|
36
33
|
|
|
37
|
-
Read the [Installation Guide](https://better-auth.com/docs/installation) to learn more.
|
|
34
|
+
Read the [Installation Guide](https://better-auth.com/docs/installation) to learn more.
|
|
@@ -2,8 +2,8 @@ import * as nanostores from 'nanostores';
|
|
|
2
2
|
import { AccessControl, StatementsPrimitive, Role } from '../plugins/access.cjs';
|
|
3
3
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
4
4
|
import { BetterFetchOption } from '@better-fetch/fetch';
|
|
5
|
-
import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-
|
|
6
|
-
export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-
|
|
5
|
+
import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-x5P1hIyV.cjs';
|
|
6
|
+
export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-x5P1hIyV.cjs';
|
|
7
7
|
import { P as Prettify } from '../helper-DxMBi7M2.cjs';
|
|
8
8
|
import { F as FieldAttribute, B as BetterAuthOptions, j as BetterAuthPlugin } from '../auth-BVa3db5J.cjs';
|
|
9
9
|
import { Store } from '../types.cjs';
|
package/dist/client/plugins.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as nanostores from 'nanostores';
|
|
|
2
2
|
import { AccessControl, StatementsPrimitive, Role } from '../plugins/access.js';
|
|
3
3
|
import * as _better_fetch_fetch from '@better-fetch/fetch';
|
|
4
4
|
import { BetterFetchOption } from '@better-fetch/fetch';
|
|
5
|
-
import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-
|
|
6
|
-
export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-
|
|
5
|
+
import { o as organization, q as Organization, M as Member, I as Invitation, u as username, m as magicLink, d as phoneNumber, f as anonymous, i as admin, j as genericOAuth, k as jwt, l as multiSession, n as emailOTP } from '../index-CX-Hopog.js';
|
|
6
|
+
export { g as getPasskeyActions, c as passkeyClient, a as twoFactorClient } from '../index-CX-Hopog.js';
|
|
7
7
|
import { P as Prettify } from '../helper-DxMBi7M2.js';
|
|
8
8
|
import { F as FieldAttribute, B as BetterAuthOptions, j as BetterAuthPlugin } from '../auth-5eyWphKM.js';
|
|
9
9
|
import { Store } from '../types.js';
|
|
@@ -3723,6 +3723,10 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
|
|
|
3723
3723
|
type: "string";
|
|
3724
3724
|
required: true;
|
|
3725
3725
|
fieldName: string | undefined;
|
|
3726
|
+
references: {
|
|
3727
|
+
model: string;
|
|
3728
|
+
field: string;
|
|
3729
|
+
};
|
|
3726
3730
|
};
|
|
3727
3731
|
role: {
|
|
3728
3732
|
type: "string";
|
|
@@ -3723,6 +3723,10 @@ declare const organization: <O extends OrganizationOptions>(options?: O) => {
|
|
|
3723
3723
|
type: "string";
|
|
3724
3724
|
required: true;
|
|
3725
3725
|
fieldName: string | undefined;
|
|
3726
|
+
references: {
|
|
3727
|
+
model: string;
|
|
3728
|
+
field: string;
|
|
3729
|
+
};
|
|
3726
3730
|
};
|
|
3727
3731
|
role: {
|
|
3728
3732
|
type: "string";
|
package/dist/node.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var d=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},H=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of i(r))!p.call(e,n)&&n!==t&&d(e,n,{get:()=>r[n],enumerable:!(o=s(r,n))||o.enumerable});return e};var
|
|
1
|
+
"use strict";var d=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var f=(e,r)=>{for(var t in r)d(e,t,{get:r[t],enumerable:!0})},H=(e,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of i(r))!p.call(e,n)&&n!==t&&d(e,n,{get:()=>r[n],enumerable:!(o=s(r,n))||o.enumerable});return e};var h=e=>H(d({},"__esModule",{value:!0}),e);var c={};f(c,{fromNodeHeaders:()=>m,toNodeHandler:()=>l});module.exports=h(c);var a=require("better-call"),l=e=>"handler"in e?(0,a.toNodeHandler)(e.handler):(0,a.toNodeHandler)(e);function m(e){let r=new Headers;for(let[t,o]of Object.entries(e))o!==void 0&&(Array.isArray(o)?o.forEach(n=>r.append(t,n)):r.set(t,o));return r}0&&(module.exports={fromNodeHeaders,toNodeHandler});
|
package/dist/node.d.cts
CHANGED
|
@@ -9,7 +9,9 @@ import './index-PzUmElyX.cjs';
|
|
|
9
9
|
import 'jose';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
11
|
|
|
12
|
-
declare const toNodeHandler: (auth:
|
|
12
|
+
declare const toNodeHandler: (auth: {
|
|
13
|
+
handler: Auth["handler"];
|
|
14
|
+
} | Auth["handler"]) => (req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
|
|
13
15
|
declare function fromNodeHeaders(nodeHeaders: IncomingHttpHeaders): Headers;
|
|
14
16
|
|
|
15
17
|
export { fromNodeHeaders, toNodeHandler };
|
package/dist/node.d.ts
CHANGED
|
@@ -9,7 +9,9 @@ import './index-CS8-YiCU.js';
|
|
|
9
9
|
import 'jose';
|
|
10
10
|
import 'better-sqlite3';
|
|
11
11
|
|
|
12
|
-
declare const toNodeHandler: (auth:
|
|
12
|
+
declare const toNodeHandler: (auth: {
|
|
13
|
+
handler: Auth["handler"];
|
|
14
|
+
} | Auth["handler"]) => (req: http.IncomingMessage, res: http.ServerResponse) => Promise<void>;
|
|
13
15
|
declare function fromNodeHeaders(nodeHeaders: IncomingHttpHeaders): Headers;
|
|
14
16
|
|
|
15
17
|
export { fromNodeHeaders, toNodeHandler };
|