*

katalin2k

  • **
  • 27 posts
Redirect to previous page after login
« on: November 17, 2024, 09:12:22 PM »
Someone should build a plugin that redirects to previous page after user logs in when he clicks to add new listing, adds new comment, etc.
Right now it redirects to account page and it’s useful.

*

MB Themes

Re: Redirect to previous page after login
« Reply #1 on: November 19, 2024, 09:48:55 PM »
I think it's trying to redirect to previous page, but previous page is login page.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • **
  • 27 posts
Re: Redirect to previous page after login
« Reply #2 on: November 19, 2024, 11:11:38 PM »
I think it's trying to redirect to previous page, but previous page is login page.
Previous page meaning the page you are coming from, before going to login page. For example you click to add a new listing, it takes you  to login page and after log in it takes you to my account. This has no logic whatsoever, it should redirect to the page you were initially going to.

*

MB Themes

Re: Redirect to previous page after login
« Reply #3 on: November 20, 2024, 01:19:29 PM »
That's not previous page already and it's not possible to provide this page to login controller as it's not http referrer.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • **
  • 27 posts
Re: Redirect to previous page after login
« Reply #4 on: November 20, 2024, 03:28:57 PM »
That's not previous page already and it's not possible to provide this page to login controller as it's not http referrer.
It should be saved in a cookie or session because this is a must. Think about it, you click to add a listing, it redirects to login page and after you log in it redirects to account page instead of the page you originally went from.

*

MB Themes

Re: Redirect to previous page after login
« Reply #5 on: November 24, 2024, 08:08:27 AM »
That could be most probably insecure method, but will review it again.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

katalin2k

  • **
  • 27 posts
Re: Redirect to previous page after login
« Reply #6 on: November 24, 2024, 11:24:39 AM »
That could be most probably insecure method, but will review it again.
This has to be rethinked. Another example is when you want to send a message(instant message) to a seller. You visit listing page, click to send a message, you are redirected to login page and after you log in you get redirected to account page, not to the “send message” page. It’s terrible for the user, he has to go back 2-3 times to go back to listing page to send message.

*

Wiz

  • ****
  • 151 posts
Re: Redirect to previous page after login
« Reply #7 on: Yesterday at 06:13:16 AM »
This is on my todo list ... ideally, a login overlay (version of login page) should be presented and the same page the user is on is refreshed after successfully logging in. No need for redirects or implementing insecure methods.

*

MB Themes

Re: Redirect to previous page after login
« Reply #8 on: Yesterday at 11:00:04 PM »
@wiz
That usually does not work well with recaptcha and social logins.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Wiz

  • ****
  • 151 posts
Re: Redirect to previous page after login
« Reply #9 on: Today at 07:00:18 AM »
@wiz
That usually does not work well with recaptcha and social logins.

Workaround for captcha/recaptcha is to trigger verification only when user starts inputing text, making selection or submitting, not on page load.

As for social logins - I don't use it but I'm sure there's a workaround for it too (what's the issue anyway?)

If refreshing the page is an issue then ajax could be used to login with secure/encrypted backend validation, no?
« Last Edit: Today at 07:13:35 AM by Wiz »