@basaltkit/auth 1.6.2 → 1.6.4
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/dist/oauth-plugin.d.ts +1 -1
- package/dist/oauth-plugin.js +1 -1
- package/dist/plugin.js +3 -0
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +1 -1
- package/package.json +4 -3
package/dist/oauth-plugin.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type BasaltRoute } from '@basaltkit/
|
|
1
|
+
import { type BasaltRoute } from '@basaltkit/http';
|
|
2
2
|
import { OAuth, type OAuthOptions, type OAuthProvider } from './oauth.js';
|
|
3
3
|
export declare const OAUTH: import("@basaltkit/core").Token<OAuth>;
|
|
4
4
|
export interface OAuthPluginOptions extends Omit<OAuthOptions, never> {
|
package/dist/oauth-plugin.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createToken, ctx, definePlugin } from '@basaltkit/core';
|
|
2
|
-
import { route } from '@basaltkit/
|
|
2
|
+
import { route } from '@basaltkit/http';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { AUTH } from './plugin.js';
|
|
5
5
|
import { OAuth, stripTrailingSlashes } from './oauth.js';
|
package/dist/plugin.js
CHANGED
|
@@ -39,6 +39,9 @@ export function authPlugin(options) {
|
|
|
39
39
|
throw new AuthRequiredError();
|
|
40
40
|
};
|
|
41
41
|
metadata.add('http:guards', guard);
|
|
42
|
+
// Claim `meta.auth` so the adapters' boot check knows this key is
|
|
43
|
+
// enforced (routes declaring it without this plugin fail loud at boot).
|
|
44
|
+
metadata.add('http:guarded-meta', 'auth');
|
|
42
45
|
},
|
|
43
46
|
});
|
|
44
47
|
}
|
package/dist/routes.d.ts
CHANGED
package/dist/routes.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@basaltkit/auth",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.4",
|
|
4
4
|
"description": "Authentication for Basalt: password hashing, JWT with refresh rotation and reuse detection, sessions, ready-made /auth routes and route guards.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"dist"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@basaltkit/core": "^1.
|
|
18
|
-
"@basaltkit/
|
|
17
|
+
"@basaltkit/core": "^1.3.0",
|
|
18
|
+
"@basaltkit/http": "^1.12.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"zod": "^3.24.0 || ^4.0.0"
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"typescript": "^7.0.2",
|
|
26
26
|
"vitest": "^4.1.11",
|
|
27
27
|
"zod": "^3.24.0 || ^4.0.0",
|
|
28
|
+
"@basaltkit/fastify": "^1.8.0",
|
|
28
29
|
"@basaltkit/tsconfig": "^0.24.0"
|
|
29
30
|
},
|
|
30
31
|
"publishConfig": {
|