1
0
KernelDeimos 1 жил өмнө
parent
commit
a86106c0c1

+ 2 - 1
packages/backend/src/routers/save_account.js

@@ -158,7 +158,8 @@ router.post('/save_account', auth, express.json(), async (req, res, next)=>{
     }
 
     // create token for login
-    const token = await jwt.sign({uuid: user_uuid}, config.jwt_secret);
+    const svc_auth = req.services.get('auth');
+    const { token } = await svc_auth.create_session_token(req.user, { req });
 
     // user id
     // todo if pseudo user, assign directly no need to do another DB lookup