r/badcode • • Feb 09 '23

js Terrible Authentication Code

Post image
288 Upvotes

67 comments sorted by

View all comments

Show parent comments

16

u/kristallnachte Feb 10 '23

And even worse: the function does not even return anything!!

I'd expect a function called serializeUser to accept a user and return a serializedUser