@riligar/auth-elysia 1.5.0 → 1.6.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/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/index.js +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -280,9 +280,9 @@ function authPlugin(userConfig = {}) {
|
|
|
280
280
|
// Instanciar cliente Auth
|
|
281
281
|
const authClient = new RiLiGarAuthClient(config.apiUrl, config.secretKey);
|
|
282
282
|
|
|
283
|
-
return new Elysia({ name: 'auth-plugin' })
|
|
283
|
+
return new Elysia({ name: 'auth-plugin', scoped: false })
|
|
284
284
|
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
285
|
-
.
|
|
285
|
+
.derive(({ request }) => ({
|
|
286
286
|
user: request.user || null,
|
|
287
287
|
authMeta: request.authMeta || null,
|
|
288
288
|
}))
|
package/dist/index.js
CHANGED
|
@@ -284,9 +284,9 @@ function authPlugin(userConfig = {}) {
|
|
|
284
284
|
// Instanciar cliente Auth
|
|
285
285
|
const authClient = new RiLiGarAuthClient(config.apiUrl, config.secretKey);
|
|
286
286
|
|
|
287
|
-
return new elysia.Elysia({ name: 'auth-plugin' })
|
|
287
|
+
return new elysia.Elysia({ name: 'auth-plugin', scoped: false })
|
|
288
288
|
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
289
|
-
.
|
|
289
|
+
.derive(({ request }) => ({
|
|
290
290
|
user: request.user || null,
|
|
291
291
|
authMeta: request.authMeta || null,
|
|
292
292
|
}))
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -279,9 +279,9 @@ export function authPlugin(userConfig = {}) {
|
|
|
279
279
|
// Instanciar cliente Auth
|
|
280
280
|
const authClient = new RiLiGarAuthClient(config.apiUrl, config.secretKey)
|
|
281
281
|
|
|
282
|
-
return new Elysia({ name: 'auth-plugin' })
|
|
282
|
+
return new Elysia({ name: 'auth-plugin', scoped: false })
|
|
283
283
|
.onBeforeHandle(createAuthMiddleware(config, authClient))
|
|
284
|
-
.
|
|
284
|
+
.derive(({ request }) => ({
|
|
285
285
|
user: request.user || null,
|
|
286
286
|
authMeta: request.authMeta || null,
|
|
287
287
|
}))
|