@live-change/password-authentication-service 0.3.41 → 0.4.1
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/change.js +2 -3
- package/definition.js +6 -4
- package/index.js +9 -8
- package/model.js +3 -3
- package/package.json +4 -3
- package/passwordValidator.js +1 -1
- package/reset.js +5 -4
- package/signIn.js +2 -2
package/change.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const { PasswordAuthentication, secretProperties } = require('./model.js')
|
|
1
|
+
import definition from './definition.js'
|
|
2
|
+
import { PasswordAuthentication, secretProperties } from './model.js'
|
|
4
3
|
|
|
5
4
|
definition.action({
|
|
6
5
|
name: 'setPassword',
|
package/definition.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
import user from '@live-change/user-service'
|
|
4
|
+
import email from '@live-change/email-service'
|
|
3
5
|
|
|
4
6
|
const definition = app.createServiceDefinition({
|
|
5
7
|
name: "passwordAuthentication",
|
|
6
|
-
use: [ user ]
|
|
8
|
+
use: [ user, email ]
|
|
7
9
|
})
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
export default definition
|
package/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import definition from './definition.js'
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import './model.js'
|
|
4
|
+
import './change.js'
|
|
5
|
+
import './signIn.js'
|
|
6
|
+
import './reset.js'
|
|
7
|
+
|
|
8
|
+
import passwordValidator from './passwordValidator.js'
|
|
7
9
|
|
|
8
10
|
definition.processor(function(service, app) {
|
|
9
|
-
service.validators.password =
|
|
11
|
+
service.validators.password = passwordValidator
|
|
10
12
|
})
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
module.exports = definition
|
|
14
|
+
export default definition
|
package/model.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import crypto from 'crypto'
|
|
2
|
+
import definition from './definition.js'
|
|
3
3
|
const config = definition.config
|
|
4
4
|
|
|
5
5
|
const secretProperties = {
|
|
@@ -31,4 +31,4 @@ definition.event({
|
|
|
31
31
|
}
|
|
32
32
|
})
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
export { PasswordAuthentication, secretProperties }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/password-authentication-service",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -20,9 +20,10 @@
|
|
|
20
20
|
"name": "Michał Łaszczewski",
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
|
+
"type": "module",
|
|
23
24
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "0.
|
|
25
|
+
"@live-change/framework": "0.8.0",
|
|
25
26
|
"nodemailer": "^6.7.2"
|
|
26
27
|
},
|
|
27
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "74215655da2a4bc3ef73c62e5d79d988276165e8"
|
|
28
29
|
}
|
package/passwordValidator.js
CHANGED
package/reset.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
import App from '@live-change/framework'
|
|
2
|
+
const app = App.app()
|
|
3
|
+
import { randomString } from '@live-change/uid'
|
|
4
|
+
import definition from './definition.js'
|
|
4
5
|
const config = definition.config
|
|
5
|
-
|
|
6
|
+
import { PasswordAuthentication, secretProperties } from './model.js'
|
|
6
7
|
|
|
7
8
|
const User = definition.foreignModel('user', 'User')
|
|
8
9
|
|
package/signIn.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import definition from './definition.js'
|
|
2
2
|
const config = definition.config
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
import { PasswordAuthentication, secretProperties } from './model.js'
|
|
5
5
|
|
|
6
6
|
for(const contactType of config.contactTypes) {
|
|
7
7
|
|