Showing
1 changed file
with
5 additions
and
2 deletions
... | @@ -16,9 +16,12 @@ export default { | ... | @@ -16,9 +16,12 @@ export default { |
16 | password: encryptPw, | 16 | password: encryptPw, |
17 | }, | 17 | }, |
18 | }); | 18 | }); |
19 | - const token = jwt.sign({ | 19 | + const token = jwt.sign( |
20 | + { | ||
20 | id: user.id, | 21 | id: user.id, |
21 | - }); | 22 | + }, |
23 | + process.env.JWT_SECRET | ||
24 | + ); | ||
22 | return { token, user }; | 25 | return { token, user }; |
23 | }, | 26 | }, |
24 | }, | 27 | }, | ... | ... |
-
Please register or login to post a comment