@neuctra/authix 2.0.0 → 3.0.0

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.
Files changed (36) hide show
  1. package/README.md +19 -29
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/neuctra-authix.es.js +1118 -5382
  5. package/dist/neuctra-authix.umd.js +6 -281
  6. package/dist/sdk/index.d.ts +3 -7
  7. package/dist/sdk/index.d.ts.map +1 -1
  8. package/dist/sdk/interfaces.d.ts +2 -23
  9. package/dist/sdk/interfaces.d.ts.map +1 -1
  10. package/package.json +6 -28
  11. package/dist/react/Provider/AuthixProvider.d.ts +0 -9
  12. package/dist/react/Provider/AuthixProvider.d.ts.map +0 -1
  13. package/dist/react/SignedIn.d.ts +0 -8
  14. package/dist/react/SignedIn.d.ts.map +0 -1
  15. package/dist/react/SignedOut.d.ts +0 -8
  16. package/dist/react/SignedOut.d.ts.map +0 -1
  17. package/dist/react/UserButton.d.ts +0 -31
  18. package/dist/react/UserButton.d.ts.map +0 -1
  19. package/dist/react/UserLogin.d.ts +0 -15
  20. package/dist/react/UserLogin.d.ts.map +0 -1
  21. package/dist/react/UserProfile.d.ts +0 -90
  22. package/dist/react/UserProfile.d.ts.map +0 -1
  23. package/dist/react/UserSignUp.d.ts +0 -19
  24. package/dist/react/UserSignUp.d.ts.map +0 -1
  25. package/dist/react/UserVerify.d.ts +0 -43
  26. package/dist/react/UserVerify.d.ts.map +0 -1
  27. package/dist/react/components/AvatarModal.d.ts +0 -66
  28. package/dist/react/components/AvatarModal.d.ts.map +0 -1
  29. package/dist/react/components/ChangePasswordModal.d.ts +0 -60
  30. package/dist/react/components/ChangePasswordModal.d.ts.map +0 -1
  31. package/dist/react/components/DeleteAccountModal.d.ts +0 -75
  32. package/dist/react/components/DeleteAccountModal.d.ts.map +0 -1
  33. package/dist/react/components/EmailVerificationModal.d.ts +0 -76
  34. package/dist/react/components/EmailVerificationModal.d.ts.map +0 -1
  35. package/dist/react/index.d.ts +0 -9
  36. package/dist/react/index.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # Neuctra Authix SDK & UI Components
1
+ # Neuctra Authix JavaScript SDK
2
2
 
3
- **Neuctra Authix** is an authentication SDK and UI component library for **React** and **Vue**.
3
+ **Neuctra Authix** is a framework-agnostic JavaScript/TypeScript SDK for authentication.
4
4
  It provides ready-to-use APIs, authentication flows, and user management utilities with **JWT**, **API Key**, **OTP verification**, and **extra user data management**.
5
5
 
6
6
  ---
@@ -9,13 +9,13 @@ It provides ready-to-use APIs, authentication flows, and user management utiliti
9
9
 
10
10
  ```bash
11
11
  # Install via npm
12
- npm install neuctra-authix
12
+ npm install @neuctra/authix
13
13
 
14
14
  # Or using yarn
15
- yarn add neuctra-authix
15
+ yarn add @neuctra/authix
16
16
 
17
17
  # Or pnpm
18
- pnpm add neuctra-authix
18
+ pnpm add @neuctra/authix
19
19
  ```
20
20
 
21
21
  ---
@@ -26,7 +26,7 @@ pnpm add neuctra-authix
26
26
  * 👤 **User Management** (Update, Delete, Change Password, Extra Data)
27
27
  * 📂 **User Data Store** (Flexible key/value objects per user)
28
28
  * 🛡 **Secure API Requests** (JWT & API Key)
29
- * 🎨 **UI Components** (React + Vue with TailwindCSS)
29
+ * ⚛️ **React UI Components** available separately in `@neuctra/authix-react`
30
30
 
31
31
  ---
32
32
 
@@ -34,8 +34,13 @@ pnpm add neuctra-authix
34
34
 
35
35
  Before using the SDK, set up the **global configuration**.
36
36
 
37
+ The `apiKey` has full account authority. Initialize the SDK only in trusted
38
+ server-side code; never put the key in browser bundles, mobile apps, or
39
+ client-exposed environment variables. Frontends should call a backend you
40
+ control.
41
+
37
42
  ```ts
38
- import { setSdkConfig, getSdkConfig } from "neuctra-authix/sdk";
43
+ import { setSdkConfig, getSdkConfig } from "@neuctra/authix";
39
44
 
40
45
  setSdkConfig({
41
46
  baseUrl: "https://server.authix.neuctra.com/api",
@@ -50,7 +55,7 @@ console.log(getSdkConfig());
50
55
  Alternatively, you can use the class-based client:
51
56
 
52
57
  ```ts
53
- import { NeuctraAuthix } from "neuctra-authix/sdk";
58
+ import { NeuctraAuthix } from "@neuctra/authix";
54
59
 
55
60
  const client = new NeuctraAuthix({
56
61
  baseUrl: "https://server.authix.neuctra.com/api",
@@ -195,25 +200,14 @@ await client.deleteUserData({ userId: "12345", dataId: "data123" });
195
200
 
196
201
  ---
197
202
 
198
- ## 🎨 UI Components
199
-
200
- ```tsx
201
- import { LoginForm, SignupForm } from "neuctra-authix/react";
202
-
203
- <LoginForm onSuccess={(session) => console.log("Logged in:", session)} />
204
- <SignupForm onSuccess={(user) => console.log("Signed up:", user)} />
205
- ```
203
+ ## 🎨 React UI Components
206
204
 
207
- Vue components are also supported:
205
+ This package is a framework-agnostic JavaScript/TypeScript SDK. Pre-built React
206
+ components (login, sign-up, profile, user button, …) now live in a separate
207
+ package: [`@neuctra/authix-react`](https://www.npmjs.com/package/@neuctra/authix-react).
208
208
 
209
- ```vue
210
- <script setup>
211
- import { LoginForm } from "neuctra-authix/vue";
212
- </script>
213
-
214
- <template>
215
- <LoginForm @success="(session) => console.log('Logged in:', session)" />
216
- </template>
209
+ ```bash
210
+ npm install @neuctra/authix @neuctra/authix-react
217
211
  ```
218
212
 
219
213
  ---
@@ -222,14 +216,10 @@ import { LoginForm } from "neuctra-authix/vue";
222
216
 
223
217
  * **TypeScript**
224
218
  * **Vite**
225
- * **React / Vue**
226
- * **TailwindCSS**
227
219
  * **Axios**
228
- * **Lucide Icons**
229
220
 
230
221
  ---
231
222
 
232
223
  ## 📄 License
233
224
 
234
225
  [MIT](./LICENSE) © 2025 Neuctra
235
-
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from "./sdk/index.js";
2
- export * from "./react/index.js";
3
2
  export type * from "./sdk/interfaces.js";
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,cAAc,kBAAkB,CAAC;AAGjC,mBAAmB,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,mBAAmB,qBAAqB,CAAC"}