@things-factory/auth-base 8.0.74 → 8.0.86

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/auth-base",
3
- "version": "8.0.74",
3
+ "version": "8.0.86",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "dist-client/index.js",
6
6
  "things-factory": true,
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "@simplewebauthn/browser": "^13.0.0",
34
34
  "@simplewebauthn/server": "^13.0.0",
35
- "@things-factory/email-base": "^8.0.64",
35
+ "@things-factory/email-base": "^8.0.86",
36
36
  "@things-factory/env": "^8.0.64",
37
- "@things-factory/shell": "^8.0.64",
37
+ "@things-factory/shell": "^8.0.86",
38
38
  "@things-factory/utils": "^8.0.64",
39
39
  "@types/webappsec-credential-management": "^0.6.9",
40
40
  "jsonwebtoken": "^9.0.0",
@@ -46,5 +46,5 @@
46
46
  "passport-jwt": "^4.0.0",
47
47
  "passport-local": "^1.0.0"
48
48
  },
49
- "gitHead": "52ffc383d8baed71dd99a2bc85f4253b3fe69977"
49
+ "gitHead": "28e364938d499b32aed41a8c664a8a2957b09b69"
50
50
  }
@@ -31,7 +31,9 @@ authPrivateProcessRouter
31
31
  .post('/update-profile', async (context, next) => {
32
32
  const { i18next, t } = context
33
33
  const newProfiles = context.request.body
34
- await updateProfile(context.state.user, newProfiles)
34
+ const saved = await updateProfile(context.state.user, newProfiles)
35
+ // update session user so subsequent /auth/profile returns updated values
36
+ context.state.user = { ...context.state.user, ...saved }
35
37
 
36
38
  if (newProfiles.locale) {
37
39
  context.body = i18next.getFixedT(newProfiles.locale)('text.profile changed successfully')
@@ -100,6 +102,7 @@ authPrivateProcessRouter
100
102
  user: {
101
103
  username: user.username,
102
104
  email: user.email,
105
+ locale: user.locale,
103
106
  name: user.name,
104
107
  signature: user.signature,
105
108
  userType: user.userType,