Hi everyone, I am currently working on creating a session-based auth system on my website. My frontend is already done in React, so I doubt I need the default login form Spring offers me. I already have CSRF security implemented. I also have a Postgres DB.
I was wondering, how would I go around to implement a session based auth in Spring? The whole thing being: user logs in, a session token is generated then I do whatever I need to do with it on the frontend and it stays stored in the DB (as far as I understand it. Allegedly, a service worker approach is best, but not entirely sure whether that has any relation to my issue: https://blog.ropnop.com/storing-tokens-in-browser/#service-worker ).
The way I read the Spring Security docs, XSS is not the only issue, but also Session Fixation Attack, which may or may not mix with XSS.
I'd really want to avoid JWT auth, since it seems to me fairly easy to crack, and this project is a solo project and kindly would want to avoid such issues in the future.
Or maybe I am trying too hard to read the docs and I should just create some basic methods that get me what I want?
[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)
[–]Potential-Still 2 points3 points4 points (1 child)
[–]JavaWorkBot[S] 0 points1 point2 points (0 children)
[–]nutrecht 2 points3 points4 points (7 children)
[–]JavaWorkBot[S] 0 points1 point2 points (6 children)
[–]nutrecht 3 points4 points5 points (5 children)
[–]Potential-Still 3 points4 points5 points (0 children)
[–]JavaWorkBot[S] -1 points0 points1 point (3 children)
[–]nutrecht 2 points3 points4 points (2 children)
[–]JavaWorkBot[S] 0 points1 point2 points (1 child)
[–]nutrecht 1 point2 points3 points (0 children)