farkam135 / Myrmey-Assist

The all-in-one UCI SOC
https://myrmeyassist.com
MIT License
1 stars 1 forks source link

Develop a myrmeyid using jwt #15

Closed farkam135 closed 6 years ago

farkam135 commented 6 years ago

Code for #13

Logic is pretty straightforward. I imported the required package (jsonwebtoken) and created a config file where further service configurations can go. For testing purposes the salt will not be deleted from the config file, so I just kept it as myrmey. On the client side I also removed the hardcoding of the res.data elements. Initially it was scrubbing data, but then the backend was changed to have the same name as it should on the front so that became pointless so now the frontend user state can just be set to the res.data object.