secure-auth-kit 1.0.3 → 1.0.5
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/LICENSE +21 -0
- package/README.md +81 -10
- package/dist/core/routes/auth.routes.d.ts.map +1 -1
- package/dist/core/routes/auth.routes.js +2 -0
- package/dist/core/routes/auth.routes.js.map +1 -1
- package/dist/features/refresh-token/refreshToken.controller.d.ts +3 -0
- package/dist/features/refresh-token/refreshToken.controller.d.ts.map +1 -0
- package/dist/features/refresh-token/refreshToken.controller.js +16 -0
- package/dist/features/refresh-token/refreshToken.controller.js.map +1 -0
- package/dist/features/refresh-token/refreshToken.service.d.ts +4 -0
- package/dist/features/refresh-token/refreshToken.service.d.ts.map +1 -0
- package/dist/features/refresh-token/refreshToken.service.js +18 -0
- package/dist/features/refresh-token/refreshToken.service.js.map +1 -0
- package/dist/features/refresh-token/refreshToken.validator.d.ts +3 -0
- package/dist/features/refresh-token/refreshToken.validator.d.ts.map +1 -0
- package/dist/features/refresh-token/refreshToken.validator.js +12 -0
- package/dist/features/refresh-token/refreshToken.validator.js.map +1 -0
- package/dist/middleware/authenticate.middleware.js +1 -1
- package/dist/types/auth.types.d.ts +3 -0
- package/dist/types/auth.types.d.ts.map +1 -1
- package/package.json +4 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Swapnil Sahare
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# Secure Auth Kit
|
|
2
2
|
|
|
3
|
+

|
|
4
|
+

|
|
5
|
+
|
|
3
6
|
Authentication toolkit for Express.js and MongoDB.
|
|
4
7
|
|
|
5
8
|
---
|
|
@@ -38,11 +41,12 @@ app.listen(3000);
|
|
|
38
41
|
|
|
39
42
|
This registers the following routes under `/auth` (configurable via `routePrefix`):
|
|
40
43
|
|
|
41
|
-
| Method | Route
|
|
42
|
-
| ------ |
|
|
43
|
-
| POST | /auth/register
|
|
44
|
-
| POST | /auth/login
|
|
45
|
-
|
|
|
44
|
+
| Method | Route | Auth required |
|
|
45
|
+
| ------ | ------------------- | ------------- |
|
|
46
|
+
| POST | /auth/register | No |
|
|
47
|
+
| POST | /auth/login | No |
|
|
48
|
+
| POST | /auth/refresh-token | No |
|
|
49
|
+
| GET | /auth/me | Yes |
|
|
46
50
|
|
|
47
51
|
---
|
|
48
52
|
|
|
@@ -93,7 +97,7 @@ secureAuth(app, {
|
|
|
93
97
|
|
|
94
98
|
## `authenticate` Middleware
|
|
95
99
|
|
|
96
|
-
Protect any route by importing `authenticate
|
|
100
|
+
Protect any route by importing `authenticate`:
|
|
97
101
|
|
|
98
102
|
```ts
|
|
99
103
|
import { authenticate } from 'secure-auth-kit';
|
|
@@ -118,7 +122,24 @@ app.get('/protected', authenticate, (req, res) => {
|
|
|
118
122
|
}
|
|
119
123
|
```
|
|
120
124
|
|
|
121
|
-
Returns
|
|
125
|
+
Returns:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"success": true,
|
|
130
|
+
"data": {
|
|
131
|
+
"user": {
|
|
132
|
+
...
|
|
133
|
+
...
|
|
134
|
+
},
|
|
135
|
+
"tokens": {
|
|
136
|
+
"accessToken": "access_token",
|
|
137
|
+
"refreshToken": "refresh_token"
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
"message": "Registration successful"
|
|
141
|
+
}
|
|
142
|
+
```
|
|
122
143
|
|
|
123
144
|
**POST /auth/login**
|
|
124
145
|
|
|
@@ -129,11 +150,61 @@ Returns `{ user, tokens: { accessToken, refreshToken }}`
|
|
|
129
150
|
}
|
|
130
151
|
```
|
|
131
152
|
|
|
132
|
-
Returns
|
|
153
|
+
Returns:
|
|
154
|
+
|
|
155
|
+
```json
|
|
156
|
+
{
|
|
157
|
+
"success": true,
|
|
158
|
+
"data": {
|
|
159
|
+
"user":{
|
|
160
|
+
...
|
|
161
|
+
...
|
|
162
|
+
},
|
|
163
|
+
"tokens": {
|
|
164
|
+
"accessToken": "access_token",
|
|
165
|
+
"refreshToken": "refresh_token"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"message": "Login successful"
|
|
169
|
+
}
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**POST /auth/refresh-token**
|
|
173
|
+
|
|
174
|
+
```json
|
|
175
|
+
{
|
|
176
|
+
"refreshToken": "your_refresh_token"
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Returns:
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"success": true,
|
|
185
|
+
"data": {
|
|
186
|
+
"accessToken": "new_access_token",
|
|
187
|
+
"refreshToken": "new_refresh_token"
|
|
188
|
+
},
|
|
189
|
+
"message": "Tokens refreshed"
|
|
190
|
+
}
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Use this endpoint when the access token expires. Send a valid refresh token and the API will issue a new token pair.
|
|
133
194
|
|
|
134
195
|
**GET /auth/me** _(requires Bearer token)_
|
|
135
|
-
|
|
136
|
-
Returns
|
|
196
|
+
|
|
197
|
+
Returns:
|
|
198
|
+
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"success":true,
|
|
202
|
+
"data":{
|
|
203
|
+
...
|
|
204
|
+
...
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
```
|
|
137
208
|
|
|
138
209
|
---
|
|
139
210
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.routes.d.ts","sourceRoot":"","sources":["../../../src/core/routes/auth.routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.routes.d.ts","sourceRoot":"","sources":["../../../src/core/routes/auth.routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAOjC,eAAO,MAAM,gBAAgB,QAAO,MAYnC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Router } from 'express';
|
|
2
2
|
import { loginController } from '../../features/login/login.controller.js';
|
|
3
3
|
import { meController } from '../../features/me/me.controller.js';
|
|
4
|
+
import { refreshTokenController } from '../../features/refresh-token/refreshToken.controller.js';
|
|
4
5
|
import { registerController } from '../../features/register/register.controller.js';
|
|
5
6
|
import { authenticate } from '../../middleware/authenticate.middleware.js';
|
|
6
7
|
export const createAuthRouter = () => {
|
|
@@ -8,6 +9,7 @@ export const createAuthRouter = () => {
|
|
|
8
9
|
// Public routes
|
|
9
10
|
router.post('/register', registerController);
|
|
10
11
|
router.post('/login', loginController);
|
|
12
|
+
router.post('/refresh-token', refreshTokenController);
|
|
11
13
|
// Protected routes
|
|
12
14
|
router.get('/me', authenticate, meController);
|
|
13
15
|
return router;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.routes.js","sourceRoot":"","sources":["../../../src/core/routes/auth.routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAW,EAAE;IACzC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB,gBAAgB;IAChB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IAC7C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.routes.js","sourceRoot":"","sources":["../../../src/core/routes/auth.routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yDAAyD,CAAC;AACjG,OAAO,EAAE,kBAAkB,EAAE,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAC;AAE3E,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAW,EAAE;IACzC,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC;IAExB,gBAAgB;IAChB,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC;IAC7C,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,eAAe,CAAC,CAAC;IACvC,MAAM,CAAC,IAAI,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,CAAC;IAEtD,mBAAmB;IACnB,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,YAAY,CAAC,CAAC;IAE9C,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.controller.d.ts","sourceRoot":"","sources":["../../../src/features/refresh-token/refreshToken.controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAM1D,eAAO,MAAM,sBAAsB,GAC/B,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,MAAM,YAAY,KACnB,OAAO,CAAC,IAAI,CAUd,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getConfig } from '../../core/stores/config.store.js';
|
|
2
|
+
import { sendSuccess } from '../../utils/response.js';
|
|
3
|
+
import { refreshTokens } from './refreshToken.service.js';
|
|
4
|
+
import { validateRefreshTokenInput } from './refreshToken.validator.js';
|
|
5
|
+
export const refreshTokenController = async (req, res, next) => {
|
|
6
|
+
try {
|
|
7
|
+
const { refreshToken } = validateRefreshTokenInput(req.body);
|
|
8
|
+
const config = getConfig();
|
|
9
|
+
const tokens = await refreshTokens(refreshToken, config);
|
|
10
|
+
sendSuccess(res, { tokens }, 'Tokens refreshed');
|
|
11
|
+
}
|
|
12
|
+
catch (err) {
|
|
13
|
+
next(err);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=refreshToken.controller.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.controller.js","sourceRoot":"","sources":["../../../src/features/refresh-token/refreshToken.controller.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAK,EACvC,GAAY,EACZ,GAAa,EACb,IAAkB,EACL,EAAE;IACf,IAAI,CAAC;QACD,MAAM,EAAE,YAAY,EAAE,GAAG,yBAAyB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAC7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;QAC3B,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;QAEzD,WAAW,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,EAAE,kBAAkB,CAAC,CAAC;IACrD,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,IAAI,CAAC,GAAG,CAAC,CAAC;IACd,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { AuthTokens } from '../../types/auth.types.js';
|
|
2
|
+
import { SecureAuthConfig } from '../../types/config.types.js';
|
|
3
|
+
export declare const refreshTokens: (token: string, config: SecureAuthConfig) => Promise<AuthTokens>;
|
|
4
|
+
//# sourceMappingURL=refreshToken.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.service.d.ts","sourceRoot":"","sources":["../../../src/features/refresh-token/refreshToken.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAI/D,eAAO,MAAM,aAAa,GACtB,OAAO,MAAM,EACb,QAAQ,gBAAgB,KACzB,OAAO,CAAC,UAAU,CAmBpB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AppError } from '../../utils/AppError.js';
|
|
2
|
+
import { generateAccessToken, generateRefreshToken, verifyToken } from '../../utils/jwt.js';
|
|
3
|
+
export const refreshTokens = async (token, config) => {
|
|
4
|
+
const { userModel, jwt: jwtConfig } = config;
|
|
5
|
+
const payload = verifyToken(token, jwtConfig);
|
|
6
|
+
if (payload.type !== 'refresh') {
|
|
7
|
+
throw AppError.unauthorized('Invalid token type', 'TOKEN_TYPE_MISMATCH');
|
|
8
|
+
}
|
|
9
|
+
const user = await userModel.findById(payload.userId);
|
|
10
|
+
if (!user) {
|
|
11
|
+
throw AppError.unauthorized('User no longer exists', 'USER_NOT_FOUND');
|
|
12
|
+
}
|
|
13
|
+
const tokenPayload = { userId: String(user._id), email: user.email };
|
|
14
|
+
const accessToken = generateAccessToken(tokenPayload, jwtConfig);
|
|
15
|
+
const refreshToken = generateRefreshToken(tokenPayload, jwtConfig);
|
|
16
|
+
return { accessToken, refreshToken };
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=refreshToken.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.service.js","sourceRoot":"","sources":["../../../src/features/refresh-token/refreshToken.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE5F,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,EAC9B,KAAa,EACb,MAAwB,EACL,EAAE;IACrB,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;IAE7C,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;IAE9C,IAAI,OAAO,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;QAC7B,MAAM,QAAQ,CAAC,YAAY,CAAC,oBAAoB,EAAE,qBAAqB,CAAC,CAAC;IAC7E,CAAC;IAED,MAAM,IAAI,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACtD,IAAI,CAAC,IAAI,EAAE,CAAC;QACR,MAAM,QAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,YAAY,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACrE,MAAM,WAAW,GAAG,mBAAmB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IACjE,MAAM,YAAY,GAAG,oBAAoB,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;IAEnE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;AACzC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.validator.d.ts","sourceRoot":"","sources":["../../../src/features/refresh-token/refreshToken.validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG9D,eAAO,MAAM,yBAAyB,GAAI,MAAM,OAAO,KAAG,iBAYzD,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AppError } from '../../utils/AppError.js';
|
|
2
|
+
export const validateRefreshTokenInput = (body) => {
|
|
3
|
+
if (typeof body !== 'object' || body === null) {
|
|
4
|
+
throw AppError.badRequest('Request body is required', 'INVALID_BODY');
|
|
5
|
+
}
|
|
6
|
+
const { refreshToken } = body;
|
|
7
|
+
if (typeof refreshToken !== 'string' || !refreshToken.trim()) {
|
|
8
|
+
throw AppError.badRequest('Refresh token is required', 'REFRESH_TOKEN_REQUIRED');
|
|
9
|
+
}
|
|
10
|
+
return { refreshToken };
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=refreshToken.validator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"refreshToken.validator.js","sourceRoot":"","sources":["../../../src/features/refresh-token/refreshToken.validator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEnD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,IAAa,EAAqB,EAAE;IAC1E,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC5C,MAAM,QAAQ,CAAC,UAAU,CAAC,0BAA0B,EAAE,cAAc,CAAC,CAAC;IAC1E,CAAC;IAED,MAAM,EAAE,YAAY,EAAE,GAAG,IAA+B,CAAC;IAEzD,IAAI,OAAO,YAAY,KAAK,QAAQ,IAAI,CAAC,YAAY,CAAC,IAAI,EAAE,EAAE,CAAC;QAC3D,MAAM,QAAQ,CAAC,UAAU,CAAC,2BAA2B,EAAE,wBAAwB,CAAC,CAAC;IACrF,CAAC;IAED,OAAO,EAAE,YAAY,EAAE,CAAC;AAC5B,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export const authenticate = (req, res, next) => {
|
|
|
15
15
|
}
|
|
16
16
|
const config = getConfig();
|
|
17
17
|
const payload = verifyToken(token, config.jwt);
|
|
18
|
-
if (payload.type
|
|
18
|
+
if (payload.type !== 'access') {
|
|
19
19
|
throw AppError.unauthorized('Invalid token type', 'TOKEN_TYPE_MISMATCH');
|
|
20
20
|
}
|
|
21
21
|
req.user = { id: payload.userId, email: payload.email };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.types.d.ts","sourceRoot":"","sources":["../../src/types/auth.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;CACtB"}
|
|
1
|
+
{"version":3,"file":"auth.types.d.ts","sourceRoot":"","sources":["../../src/types/auth.types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,UAAU;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,WAAW;IACxB,IAAI,EAAE,aAAa,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;CACtB;AAED,MAAM,WAAW,iBAAiB;IAC9B,YAAY,EAAE,MAAM,CAAC;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "secure-auth-kit",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Authentication toolkit for Express and MongoDB",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"build": "tsc"
|
|
29
29
|
},
|
|
30
30
|
"keywords": [
|
|
31
|
+
"secure auth kit",
|
|
31
32
|
"authentication",
|
|
32
33
|
"jwt",
|
|
33
34
|
"express",
|
|
@@ -51,5 +52,6 @@
|
|
|
51
52
|
"typescript": "^5.4.0",
|
|
52
53
|
"express": "^5.2.1",
|
|
53
54
|
"mongoose": "^8.24.0"
|
|
54
|
-
}
|
|
55
|
+
},
|
|
56
|
+
"license": "MIT"
|
|
55
57
|
}
|