@moriajs/auth 0.4.1 → 0.4.3

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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @moriajs/auth@0.4.1 build C:\Codes\node\2026\github\moriajs\packages\auth
2
+ > @moriajs/auth@0.4.3 build C:\Codes\node\2026\github\moriajs\packages\auth
3
3
  > tsc
4
4
 
package/README.md ADDED
@@ -0,0 +1,24 @@
1
+ # @moriajs/auth
2
+
3
+ Authentication plugin for MoriaJS.
4
+
5
+ ## Features
6
+
7
+ - **JWT-based**: Secure authentication using JSON Web Tokens.
8
+ - **OAuth Support**: Easy integration with GitHub, Google, and more.
9
+ - **Auth Hooks**: `requireAuth` guard for routes.
10
+
11
+ ## Usage
12
+
13
+ ```ts
14
+ import { authPlugin, requireAuth } from '@moriajs/auth';
15
+
16
+ await app.use(authPlugin({
17
+ secret: 'your-secret'
18
+ }));
19
+
20
+ // Guard a route
21
+ server.get('/me', { preHandler: [requireAuth] }, async (req) => {
22
+ return req.user;
23
+ });
24
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moriajs/auth",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "type": "module",
5
5
  "description": "MoriaJS auth — JWT + httpOnly cookies, pluggable auth system",
6
6
  "main": "./dist/index.js",
@@ -22,7 +22,7 @@
22
22
  "fastify": "^5.2.0"
23
23
  },
24
24
  "peerDependencies": {
25
- "@moriajs/core": "0.4.1"
25
+ "@moriajs/core": "0.4.3"
26
26
  },
27
27
  "license": "MIT",
28
28
  "author": "Guntur-D <guntur.d.npm@gmail.com>",