@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.
- package/README.md +19 -29
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/neuctra-authix.es.js +1118 -5382
- package/dist/neuctra-authix.umd.js +6 -281
- package/dist/sdk/index.d.ts +3 -7
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/interfaces.d.ts +2 -23
- package/dist/sdk/interfaces.d.ts.map +1 -1
- package/package.json +6 -28
- package/dist/react/Provider/AuthixProvider.d.ts +0 -9
- package/dist/react/Provider/AuthixProvider.d.ts.map +0 -1
- package/dist/react/SignedIn.d.ts +0 -8
- package/dist/react/SignedIn.d.ts.map +0 -1
- package/dist/react/SignedOut.d.ts +0 -8
- package/dist/react/SignedOut.d.ts.map +0 -1
- package/dist/react/UserButton.d.ts +0 -31
- package/dist/react/UserButton.d.ts.map +0 -1
- package/dist/react/UserLogin.d.ts +0 -15
- package/dist/react/UserLogin.d.ts.map +0 -1
- package/dist/react/UserProfile.d.ts +0 -90
- package/dist/react/UserProfile.d.ts.map +0 -1
- package/dist/react/UserSignUp.d.ts +0 -19
- package/dist/react/UserSignUp.d.ts.map +0 -1
- package/dist/react/UserVerify.d.ts +0 -43
- package/dist/react/UserVerify.d.ts.map +0 -1
- package/dist/react/components/AvatarModal.d.ts +0 -66
- package/dist/react/components/AvatarModal.d.ts.map +0 -1
- package/dist/react/components/ChangePasswordModal.d.ts +0 -60
- package/dist/react/components/ChangePasswordModal.d.ts.map +0 -1
- package/dist/react/components/DeleteAccountModal.d.ts +0 -75
- package/dist/react/components/DeleteAccountModal.d.ts.map +0 -1
- package/dist/react/components/EmailVerificationModal.d.ts +0 -76
- package/dist/react/components/EmailVerificationModal.d.ts.map +0 -1
- package/dist/react/index.d.ts +0 -9
- package/dist/react/index.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Neuctra Authix SDK
|
|
1
|
+
# Neuctra Authix JavaScript SDK
|
|
2
2
|
|
|
3
|
-
**Neuctra Authix** is
|
|
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
|
|
12
|
+
npm install @neuctra/authix
|
|
13
13
|
|
|
14
14
|
# Or using yarn
|
|
15
|
-
yarn add neuctra
|
|
15
|
+
yarn add @neuctra/authix
|
|
16
16
|
|
|
17
17
|
# Or pnpm
|
|
18
|
-
pnpm add neuctra
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
-
```
|
|
210
|
-
|
|
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
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gBAAgB,CAAC;AAG/B,mBAAmB,qBAAqB,CAAC"}
|