@live-change/password-authentication-service 0.9.171 → 0.9.174

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/signIn.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/password-authentication-service",
3
- "version": "0.9.171",
3
+ "version": "0.9.174",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,8 +22,8 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.9.171",
25
+ "@live-change/framework": "^0.9.174",
26
26
  "nodemailer": "^6.7.2"
27
27
  },
28
- "gitHead": "2a684f9d6b097ef5b8e1e08edb4995949ee33330"
28
+ "gitHead": "6ebdadad702526df240bd3aa7ac3d97324a0308a"
29
29
  }
package/signIn.js CHANGED
@@ -29,7 +29,7 @@ for(const contactType of config.contactTypes) {
29
29
  ...contactTypeProperties,
30
30
  ...secretProperties(false)
31
31
  },
32
- async execute({ [contactTypeName]: contact, passwordHash }, { client, service }, emit) {
32
+ async execute({ [contactTypeName]: contact, passwordHash }, { client, trigger }, emit) {
33
33
  const contactData = await app.viewGet('get'+contactTypeUName, { [contactType]: contact })
34
34
  if(!contactData) throw { properties: { email: 'emailNotFound' } }
35
35
  const { user } = contactData
@@ -40,7 +40,7 @@ for(const contactType of config.contactTypes) {
40
40
  if(!passwordAuthenticationData || passwordAuthenticationData.passwordHash !== passwordHash)
41
41
  throw { properties: { passwordHash: 'wrongPassword' } }
42
42
  const { session } = client
43
- await service.trigger({ type: 'signIn' }, {
43
+ await trigger({ type: 'signIn' }, {
44
44
  user, session
45
45
  })
46
46
  return user
@@ -49,7 +49,7 @@ for(const contactType of config.contactTypes) {
49
49
  const messageData = {
50
50
  user
51
51
  }
52
- const results = await service.trigger({ type: 'authenticateWithMessage' }, {
52
+ const results = await trigger({ type: 'authenticateWithMessage' }, {
53
53
  contactType,
54
54
  contact,
55
55
  messageData,