The link to the "Login" page from from any other page links to a URL contains a redirect query parameter with the original page's path, e.g. http://localhost:3000/login?redirect=about.
Clicking on "Login" repeatedly encodes this URL including the query parameter in a new link within the very same query parameter, i.e. http://localhost:3000/login?redirect=login%3Fredirect%3Dabout for the example above. This has issues:
The URL becomes increasingly long, possibly exceeding maximum URL length.
After login the user is not redirect to the original page or any useful page but is presented the login page again although already logged in.
Possible solutions:
keep the original redirect query parameter when creating the new login URLs (clicking repeatedly doesn't change its value)
omit the redirect parameter if the source page is the login page
The link to the "Login" page from from any other page links to a URL contains a
redirect
query parameter with the original page's path, e.g.http://localhost:3000/login?redirect=about
.Clicking on "Login" repeatedly encodes this URL including the query parameter in a new link within the very same query parameter, i.e.
http://localhost:3000/login?redirect=login%3Fredirect%3Dabout
for the example above. This has issues:Possible solutions:
redirect
query parameter when creating the new login URLs (clicking repeatedly doesn't change its value)redirect
parameter if the source page is the login page