Created
October 28, 2022 15:00
-
-
Save WoolDoughnut310/1f9765a3acefc863c98593826ecc4371 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post("/login", async (req, res) => { | |
... | |
const accessToken = jwt.sign({ id: user._id }, process.env.JWT_SECRET); | |
res.status(200).json({ accessToken }); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment