@feathersjs/authentication-local 5.0.0-pre.28 → 5.0.0-pre.29
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/CHANGELOG.md +11 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
- package/src/index.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0-pre.29](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.28...v5.0.0-pre.29) (2022-09-16)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **authentication-oauth:** Koa and transport independent oAuth authentication ([#2737](https://github.com/feathersjs/feathers/issues/2737)) ([9231525](https://github.com/feathersjs/feathers/commit/9231525a24bb790ba9c5d940f2867a9c727691c9))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [5.0.0-pre.28](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.27...v5.0.0-pre.28) (2022-08-03)
|
|
7
18
|
|
|
8
19
|
|
package/lib/index.js
CHANGED
|
@@ -17,6 +17,9 @@ exports.hooks = { hashPassword: hash_password_1.default, protect: protect_1.defa
|
|
|
17
17
|
* @returns
|
|
18
18
|
*/
|
|
19
19
|
const passwordHash = (options) => async (value, _data, context) => {
|
|
20
|
+
if (value === undefined) {
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
20
23
|
const { app, params } = context;
|
|
21
24
|
const authService = app.defaultAuthentication(options.service);
|
|
22
25
|
const localStrategy = authService.getStrategy(options.strategy);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names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OAAO,CAAC,QAAQ,CAAkB,CAAA;IAEhF,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;AAClD,CAAC,CAAA;AAZU,QAAA,YAAY,gBAYtB"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feathersjs/authentication-local",
|
|
3
3
|
"description": "Local authentication strategy for @feathers/authentication",
|
|
4
|
-
"version": "5.0.0-pre.
|
|
4
|
+
"version": "5.0.0-pre.29",
|
|
5
5
|
"homepage": "https://feathersjs.com",
|
|
6
6
|
"main": "lib/",
|
|
7
7
|
"types": "lib/",
|
|
@@ -53,24 +53,24 @@
|
|
|
53
53
|
"access": "public"
|
|
54
54
|
},
|
|
55
55
|
"dependencies": {
|
|
56
|
-
"@feathersjs/authentication": "^5.0.0-pre.
|
|
57
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
58
|
-
"@feathersjs/errors": "^5.0.0-pre.
|
|
59
|
-
"@feathersjs/feathers": "^5.0.0-pre.
|
|
56
|
+
"@feathersjs/authentication": "^5.0.0-pre.29",
|
|
57
|
+
"@feathersjs/commons": "^5.0.0-pre.29",
|
|
58
|
+
"@feathersjs/errors": "^5.0.0-pre.29",
|
|
59
|
+
"@feathersjs/feathers": "^5.0.0-pre.29",
|
|
60
60
|
"bcryptjs": "^2.4.3",
|
|
61
61
|
"lodash": "^4.17.21"
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
|
-
"@feathersjs/memory": "^5.0.0-pre.
|
|
65
|
-
"@feathersjs/schema": "^5.0.0-pre.
|
|
64
|
+
"@feathersjs/memory": "^5.0.0-pre.29",
|
|
65
|
+
"@feathersjs/schema": "^5.0.0-pre.29",
|
|
66
66
|
"@types/bcryptjs": "^2.4.2",
|
|
67
|
-
"@types/lodash": "^4.14.
|
|
67
|
+
"@types/lodash": "^4.14.185",
|
|
68
68
|
"@types/mocha": "^9.1.1",
|
|
69
|
-
"@types/node": "^18.
|
|
69
|
+
"@types/node": "^18.7.17",
|
|
70
70
|
"mocha": "^10.0.0",
|
|
71
71
|
"shx": "^0.3.4",
|
|
72
72
|
"ts-node": "^10.9.1",
|
|
73
|
-
"typescript": "^4.
|
|
73
|
+
"typescript": "^4.8.3"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "4314dc89a41a8bbaabf00b47697bf7887861d17d"
|
|
76
76
|
}
|
package/src/index.ts
CHANGED
|
@@ -16,6 +16,10 @@ export { LocalStrategy }
|
|
|
16
16
|
export const passwordHash =
|
|
17
17
|
(options: { service?: string; strategy: string }) =>
|
|
18
18
|
async <H extends HookContext<any, any>>(value: string | undefined, _data: any, context: H) => {
|
|
19
|
+
if (value === undefined) {
|
|
20
|
+
return value
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
const { app, params } = context
|
|
20
24
|
const authService = app.defaultAuthentication(options.service)
|
|
21
25
|
const localStrategy = authService.getStrategy(options.strategy) as LocalStrategy
|