2FAuth icon indicating copy to clipboard operation
2FAuth copied to clipboard

"Already authenticated" error message

Open Elbullazul opened this issue 1 year ago • 14 comments

Version

5.0.2

Details & Steps to reproduce

After logging in and waiting some time (ex. 1 hour), the login screen appears when accessing the page. However, after entering the credentials, the following message appears:

Screenshot 2023-12-28 at 10-34-35 Error

Expectation

If the service prompts me to login, it should be because I am already logged out. It seems that the session isn't properly closed after max. session length is reached. It worked fine in release 4.2.4

This does not happen when manually logging out.

Error & Logs

<reverse-proxy-ip> - - [29/Dec/2023:17:17:55 +0000] "POST /user/login HTTP/1.1" 400 68 "https://2fauth.domain.example/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"
<reverse-proxy-ip> - - [29/Dec/2023:17:17:55 +0000] "GET /build/assets/Error-975ed5c3.js HTTP/1.1" 304 0 "https://2fauth.domain.example/build/assets/app-1b332c21.js" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0"

Execution environment

Date: Fri, 29 Dec 2023 20:28:29 +0000
userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0
Version: 5.0.2
Environment: local
Install path: /
Debug: false
Cache driver: file
Log channel: daily
Log level:
DB driver: sqlite
PHP version: 8.1.22
Operating system: Linux
interface: fpm-fcgi
Auth guard: web-guard
webauthn user verification: preferred
Trusted proxies: *

Containerization

  • [X] Docker

Additional information

No response

Elbullazul avatar Dec 29 '23 20:12 Elbullazul

I get this error as well.

taryujiai avatar Dec 30 '23 02:12 taryujiai

Hi, Does it occur regardless of the Auto lock setting value? Can you please reproduce with dev tools (F12) opened on the network tab. Do you see a request to /user/logout?

Bubka avatar Jan 02 '24 16:01 Bubka

There is no call to /user/logout: image

I had auto lock set to 15 minutes, I tried changing it to one minute and still get the error.

Elbullazul avatar Jan 02 '24 18:01 Elbullazul

+1 same issue here

ryosoftware avatar Jan 06 '24 06:01 ryosoftware

Same issue forme too since the last update (v5.0.2) Autolock after 30 mins

NOnooSS avatar Jan 14 '24 14:01 NOnooSS

@kslcsdalsadg @NOnooSS Do you see a call to user/logout in dev tools unlike Elbullazul? (You can test with autolock set to 1min to speed up, the behavior should be the same)

Bubka avatar Jan 16 '24 22:01 Bubka

Nope, logout isn't called. This is the list of calls when I enter to my 2fa site

image

ryosoftware avatar Jan 17 '24 05:01 ryosoftware

I was having this same issue, seem to have just solved it by doing a complete erase of all browser cache data. Worth a go if you're facing this.

dansharpy avatar Jan 23 '24 10:01 dansharpy

Same issue when using OpenID account. That's annoying because I've installed on mobile phone (Add to Home Screen), as it get stuck.

heliohenriques avatar Feb 14 '24 08:02 heliohenriques

same issue

onlineapps-cloud avatar Feb 16 '24 09:02 onlineapps-cloud

Does the Back to home link in the footer brings you to the 2fa list or does it loop on the error msg?

Bubka avatar Feb 18 '24 12:02 Bubka

It took me to the 2fa list correctly.

But I cannot reproduce this bug anymore with 5.0.3.

Edit: I was using the "never" auto-lock option (to avoid encountering this bug), and changed it back to 15 minutes to confirm the behaviour. For some time after changing the setting, the bug was not occurring. It started happening again after some time, not sure if this helps.

Elbullazul avatar Feb 18 '24 14:02 Elbullazul

Does the Back to home link in the footer brings you to the 2fa list or does it loop on the error msg?

In my case te back to home link opens the main page.

ryosoftware avatar Feb 18 '24 18:02 ryosoftware

Using OpenID, I need to choose the option "Sign In" and after "Back Home".

heliohenriques avatar Feb 19 '24 08:02 heliohenriques

I've got the same issue. Back to home opens the main page.

CaptainKey3s avatar Feb 23 '24 07:02 CaptainKey3s

Ok I think I get it! I've found an error in the way inactivity is handled by the backend. I will release a new version shortly, the time for me to validate my fix in all possible situations.

Bubka avatar Feb 29 '24 12:02 Bubka

I'm using v5.0.4 and I have this issue as well. Is there already a fix for this?

Anilo1990 avatar Mar 12 '24 15:03 Anilo1990

The fix is not available yet, sorry, I still have few things to do before releasing it.

Bubka avatar Mar 12 '24 15:03 Bubka

@Bubka ok, there's no hurry. Thank you for taking care of a bugfix. I came across this thread while researching and didn't know if it had been already fixed or not. Hope to see the new version soon :-)

Anilo1990 avatar Mar 12 '24 22:03 Anilo1990