As detailed in https://github.com/beyond-all-reason/teiserver/issues/175#issuecomment-2385399045, live endpoints that redirect to '/login' on mount cannot set the _redirected_to cookie. Therefore, when unlogged in users try to access a live endpoint, they will be redirected to '/login', and upon logging in be redirected to '/' instead of their original destination.
This change ensures that all live endpoints use the :protected pipeline, which can redirect users back to their original destination once they completed logging in.
Added a bunch of tests to verify that the live endpoints require authentication. Added a specific test to ensure that users are redirected back to the edit password page when they complete logging in (the original reported issue in #175).
As detailed in https://github.com/beyond-all-reason/teiserver/issues/175#issuecomment-2385399045, live endpoints that redirect to '/login' on mount cannot set the _redirected_to cookie. Therefore, when unlogged in users try to access a live endpoint, they will be redirected to '/login', and upon logging in be redirected to '/' instead of their original destination.
This change ensures that all live endpoints use the :protected pipeline, which can redirect users back to their original destination once they completed logging in.
Added a bunch of tests to verify that the live endpoints require authentication. Added a specific test to ensure that users are redirected back to the edit password page when they complete logging in (the original reported issue in #175).
Addresses #175