@feathersjs/authentication-local 5.0.0-pre.27 → 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 +22 -0
- package/lib/index.js +3 -0
- package/lib/index.js.map +1 -1
- package/package.json +14 -13
- package/src/index.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
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
|
+
|
|
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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **cli:** Improve generated application and client ([#2701](https://github.com/feathersjs/feathers/issues/2701)) ([bd55ffb](https://github.com/feathersjs/feathers/commit/bd55ffb812e89bf215f4515e7f137656ea888c3f))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
# [5.0.0-pre.27](https://github.com/feathersjs/feathers/compare/v5.0.0-pre.26...v5.0.0-pre.27) (2022-07-13)
|
|
7
29
|
|
|
8
30
|
**Note:** Version bump only for package @feathersjs/authentication-local
|
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":[],"mappings":";;;;;;AACA,0EAAgD;AAChD,8DAAqC;AACrC,yCAA0C;AAGjC,8FAHA,wBAAa,OAGA;AADT,QAAA,KAAK,GAAG,EAAE,YAAY,EAAZ,uBAAY,EAAE,OAAO,EAAP,iBAAO,EAAE,CAAA;AAG9C;;;;;;GAMG;AACI,MAAM,YAAY,GACvB,CAAC,OAA+C,EAAE,EAAE,CACpD,KAAK,EAAmC,KAAyB,EAAE,KAAU,EAAE,OAAU,EAAE,EAAE;IAC3F,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAG,GAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAC9D,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,QAAQ,CAAkB,CAAA;IAEhF,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,CAAC,CAAA;AAClD,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AACA,0EAAgD;AAChD,8DAAqC;AACrC,yCAA0C;AAGjC,8FAHA,wBAAa,OAGA;AADT,QAAA,KAAK,GAAG,EAAE,YAAY,EAAZ,uBAAY,EAAE,OAAO,EAAP,iBAAO,EAAE,CAAA;AAG9C;;;;;;GAMG;AACI,MAAM,YAAY,GACvB,CAAC,OAA+C,EAAE,EAAE,CACpD,KAAK,EAAmC,KAAyB,EAAE,KAAU,EAAE,OAAU,EAAE,EAAE;IAC3F,IAAI,KAAK,KAAK,SAAS,EAAE;QACvB,OAAO,KAAK,CAAA;KACb;IAED,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAA;IAC/B,MAAM,WAAW,GAAG,GAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAC9D,MAAM,aAAa,GAAG,WAAW,CAAC,WAAW,CAAC,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/",
|
|
@@ -42,7 +42,8 @@
|
|
|
42
42
|
],
|
|
43
43
|
"scripts": {
|
|
44
44
|
"prepublish": "npm run compile",
|
|
45
|
-
"
|
|
45
|
+
"pack": "npm pack --pack-destination ../cli/test",
|
|
46
|
+
"compile": "shx rm -rf lib/ && tsc && npm run pack",
|
|
46
47
|
"test": "mocha --config ../../.mocharc.json --recursive test/**.test.ts test/**/*.test.ts"
|
|
47
48
|
},
|
|
48
49
|
"directories": {
|
|
@@ -52,24 +53,24 @@
|
|
|
52
53
|
"access": "public"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
|
-
"@feathersjs/authentication": "^5.0.0-pre.
|
|
56
|
-
"@feathersjs/commons": "^5.0.0-pre.
|
|
57
|
-
"@feathersjs/errors": "^5.0.0-pre.
|
|
58
|
-
"@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",
|
|
59
60
|
"bcryptjs": "^2.4.3",
|
|
60
61
|
"lodash": "^4.17.21"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
|
-
"@feathersjs/memory": "^5.0.0-pre.
|
|
64
|
-
"@feathersjs/schema": "^5.0.0-pre.
|
|
64
|
+
"@feathersjs/memory": "^5.0.0-pre.29",
|
|
65
|
+
"@feathersjs/schema": "^5.0.0-pre.29",
|
|
65
66
|
"@types/bcryptjs": "^2.4.2",
|
|
66
|
-
"@types/lodash": "^4.14.
|
|
67
|
+
"@types/lodash": "^4.14.185",
|
|
67
68
|
"@types/mocha": "^9.1.1",
|
|
68
|
-
"@types/node": "^18.
|
|
69
|
+
"@types/node": "^18.7.17",
|
|
69
70
|
"mocha": "^10.0.0",
|
|
70
71
|
"shx": "^0.3.4",
|
|
71
|
-
"ts-node": "^10.
|
|
72
|
-
"typescript": "^4.
|
|
72
|
+
"ts-node": "^10.9.1",
|
|
73
|
+
"typescript": "^4.8.3"
|
|
73
74
|
},
|
|
74
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "4314dc89a41a8bbaabf00b47697bf7887861d17d"
|
|
75
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
|