Remember document URL after expired authentication #4466
Labels
status: blocked by upstream
Problems with dependencies. Things we have little control over or that should be fixed at the source
status: confirmed
We have confirmed that the issue exists
type: bug
Something isn't working
Milestone
Which part of the project should be enhanced?
Missing Auth Redirection Code Base
Is your enhancement request related to a problem? Please describe.
Whenever the authentication of Hedgedoc (auth via OAuth2 (Keycloak instance)) expires, Hedgedoc redirects to its base URL. When logging in again, the document visited / URL active before redirection is lost and the information about which document was viewed in that tab is lost.
Describe the solution you'd like
Whenever the authentication of Hedgedoc expires, Hedgedoc redirects to its base URL but remembers the original URL, e.g. via query parameter such as
?lastVisited=n0ZtF0-uR96LDAMpSPHqQg
. When logging in again, the document visited is shown again.Describe alternatives you've considered
Logging in and then using the browser's
Back
button to get back to the document that tab had open before.Strange enough, sometimes even the browser history does not contain any information on that URL anymore. Possibly because JavaScript is used to rewrite the current URL instead of redirecting, preventing the browser from storing any history on this.
Additional context
The text was updated successfully, but these errors were encountered: