Skip to content

Evaluate redundant redirects between client and server #2992

Closed
@lindapaiste

Description

@lindapaiste

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.

Metadata

Metadata

Labels

Area: Code QualityFor refactoring, cleanup, or improvements to maintainabilityArea:BackendFor server-side logic, APIs, or database functionalityPriority:HighShould be addressed soon but not critical

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions