niehusst / net-go

The game Go over the internet.
GNU General Public License v3.0
0 stars 0 forks source link

lock frontend routes behind auth #48

Open niehusst opened 7 months ago

niehusst commented 7 months ago

things like the GamePlay Page should only be accessible to authed users. We should be able to build this into the Session. Backed will validate the httpOnly auth cookie... and somehow tell frontend

dont want to block whole home page from loading by doing auth as soon as page load, so use cookie presense as a hint, but meybe perform auth request to server on nav to Session protected route?? idk that still feels like too many requests

niehusst commented 3 months ago

maybe this will just end up being implicitly locked rather than explicitly... the game play pages will do an auth-required fetch req that will 401, and on 401 resp, frontend can redirect to a login page