question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Redirect to previous page when login on the website

See original GitHub issue

Brief summary of issue / Description of requested feature:

When one logs in the website with his account name and password, he is redirected to the home page. It would make more sense to redirect him to the page on which he was before pressing the login link, as he might be prevented from accessing this page without login in.

Steps to reproduce the issue / Reasons for adding feature:

  1. It is probably quite easy to do.
  2. I don’t suppose it would annoy other game developers/current players.
  3. If the redirect page can be set in the settings (I believe so), perhaps a special symbol, like :back (that can’t be a proper file name) could be used to indicate redirecting the user to the previous page.

Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:

  • Evennia: develop.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
TehomCDcommented, Feb 26, 2018

Django’s docs states that the setting is used when the view gets no next parameter, so it’s ignored when you specify that.

0reactions
vincent-lgcommented, Feb 26, 2018

Thanks! I guess in my case what I should do is simply to redirect to the settings.LOGIN_URL with next being the same URL if the user isn’t authenticated, and the wiki page she’s trying to read isn’t public. It might solve my problem. I’ll check!

Read more comments on GitHub >

github_iconTop Results From Across the Web

php - Redirecting to previous page after login? - Stack Overflow
Construct the form action such that it 'remembers', or persists, the previous page by writing out a ...
Read more >
redirect to last/previous page after user log-in - ProcessWire
I found this post, it handle the redirection manually, which could allow to store page id to session variable or redirect url with...
Read more >
Redirect to the Previous URL After Login with Spring Security
This article will focus on how to redirect a user back to the originally requested URL – after they log in. Previously, we've...
Read more >
How to go previous page after login? - PHP - SitePoint Forums
The login form can use the HTTP_REFERER to find out the page that the person came from. If it's empty, you can set...
Read more >
Redirect to previous page after login - Laracasts
Redirect to previous page after login. This maybe a very basic question. I have /privatepage that only authenticated user able to access. questions:....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found