Showing
1 changed file
with
6 additions
and
3 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 | - id: user.id, | 20 | + { |
21 | - }); | 21 | + id: user.id, |
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