Description
Increasing Access
It is confusing to work with code where redirections can be be initiated from multiple places.
Feature enhancement details
Ref: #2987 (comment)
We should look through the https://github.com/processing/p5.js-web-editor/blob/develop/client/routes.jsx file and see which redirects are not actually needed because they are already handled by the server in https://github.com/processing/p5.js-web-editor/blob/develop/server/routes/server.routes.js.
Specifically, we should check over our usages of userIsNotAuthenticated
, userIsAuthenticated
, userIsAuthorized
, and createRedirectWithUsername
. I have a hunch that we can actually delete all four of those functions. Let's make a list of all routes which use some form of redirection and whether each route's redirect logic duplicates what is already implemented on the server.