• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Login in to jpsoft.com/forums/login

Affected version
2.0.1
#1
I enter my information then click on LogIn. It come to another https://jpsoft.com/forums/login and says in part:

=======================
Oops! We ran into some problems.

You are already logged in. Please click here to return to the forum list.
=======================

Seems that this is an error - as it would be better to directly go to the main forums page
 

Mike

XenForo developer
Staff member
#2
I'm generally going to call this as designed; it was an intentional change. If you're explicitly clicking on a link that goes to the login page, a silent redirect is quite possibly not expected. You shouldn't really be directed to that URL for any reason. I've tried to be redirected back to that URL after logging in and can't reproduce that, so if you have steps for that, then that may be a bug.

I am making a change for 2.0.2 such that if a site does want the silent redirect behavior for a link from their own system, they can add a check=1 parameter to the link. If the user is logged in already, then we will redirect them automatically.
 
#3
Mike,
I will let Rex, the one behind the JPSoft forums, know about your reply. It's just that after I enter my user details, then click to log in, I do not need to be told I am already logged in. Just should be shown he main forums page.....

I am using FireFox 58b16 under Win 7 (6.1.7601.17567), in casr that matters. I also have everything EXCEPT Offline Website data checked for Settings. The attached capture is of my Firefox settings...

Thank you for the fix in the next release too.
 

Attachments

#4
I'm generally going to call this as designed; it was an intentional change. If you're explicitly clicking on a link that goes to the login page, a silent redirect is quite possibly not expected. You shouldn't really be directed to that URL for any reason. I've tried to be redirected back to that URL after logging in and can't reproduce that, so if you have steps for that, then that may be a bug.

I am making a change for 2.0.2 such that if a site does want the silent redirect behavior for a link from their own system, they can add a check=1 parameter to the link. If the user is logged in already, then we will redirect them automatically.
In XF1 when I would close my browser I would be logged out. Next time I open my browser I would have to enter my login information again and then I would be directed to the main forum page. In XF2 when I close my browser I am also logged out. Next time I open my browser I have to enter my login information. But now I get this same error that I'm already logged in. It seems that in XF1 the cookie information that tells the forum you are logged in is stored on the local device and in XF2 that information is stored on the server. So it's not being cleared out when I close my browser.

Now if I click log out before I close my browser next time I open the browser and login I get no error.
 
#5
I also use a landing page with a link to the login page. This was to avoid the error of sending users to the /community/index before they logged in. I used this redirect before to avoid the you're already logged in error when I'm actually still logged in.

/community/login?redirect=/community/

This redirect doesn't work any longer in XF2. It gives the same you're already logged in error.
 
Last edited:

Mike

XenForo developer
Staff member
#6
If you have a repeatable process where you enter login details and then end up being redirected back to the login page, displaying the "already logged in" error, that is something we would consider a bug. Though that was specifically the thing that I couldn't reproduce. If you're explicitly going to the "/login" URL while already logged in, displaying that message is intentional.

I also use a landing page with a link to the login page.
Given your example and site, there isn't really any benefit to this -- the main community page is a login page for guests if they have no permission (which applies in your case).

Regardless, the tweak I made means that the following link should be equivalent:
Code:
/community/login?check=1&_xfRedirect=/community/
 
#7
If you have a repeatable process where you enter login details and then end up being redirected back to the login page, displaying the "already logged in" error, that is something we would consider a bug. Though that was specifically the thing that I couldn't reproduce. If you're explicitly going to the "/login" URL while already logged in, displaying that message is intentional.
So it looks like my problem only occurs when signing in through "/community/login". Below are the steps I go through.

Go to /community/login. Enter user name and password. I'm redirected to the two way verification screen. I enter my code. Then I'm redirected to this error page:


=======================
Oops! We ran into some problems.

You are already logged in. Please click here to return to the forum list.
=======================

Log out and do it again same results. Log out again. Reset browser clear all history and cache. Log in again at /community/login and get the same error page.

Now if I sign in at /community/index then there is no error. Problem is I need a login screen with no error message. If the link on my landing page points to /community/ then the user sees an error and thinks something is wrong.
 
#8
If I sign in at /community/index.php?login I don't get the error.

I get the error on this site too.
 
Last edited: