Skip to content

Web UI stuck on /web/logged-in after login, no redirect to main app #11318

Closed

Description

@chouswei

1. Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

(Related: #11317 was opened but locked; this report follows the official bug report template.)

2. Describe the bug*

The web UI gets stuck on /web/logged-in after a successful login. The page never redirects to the main application (dashboard). Backend returns 200 for session, user/me, user/roles, and /auth/ — so auth works. The frontend simply does not navigate away from the "logged-in" screen. Navigating manually to http://<server>/web/ redirects back to /web/logged-in, so there is no workaround; the user is stuck in a loop. Mobile app (Dart) works correctly.

3. Steps to Reproduce

  1. Open the InvenTree web UI at http://<server>/web/login (e.g. http://10.0.0.10/web/login).
  2. Enter valid credentials and submit login.
  3. Observe: the page goes to /web/logged-in and stays there (no redirect to main app).
  4. Optionally: change the URL to http://<server>/web/ and press Enter — the app redirects back to /web/logged-in.

4. Expected behaviour

After successful login, the web UI should redirect from /web/logged-in to the main application (e.g. dashboard or /web/). Logged-in users opening /web/ should see the main app, not be redirected back to /web/logged-in.

5. Deployment Method

  • Docker

6. Version Information

InvenTree Version: 1.2.0 (stable)
Docker image: inventree/inventree:stable
API returns 200 for /api/auth/v1/auth/session, /api/user/me/, /api/user/roles/ when on /web/logged-in.
(Cannot access About InvenTree from web UI due to this bug.)

7. Try to reproduce on the demo site

  • I did not try to reproduce

8. Is the bug reproducible on the demo site?

  • Not reproducible
    (Not tested on demo; please select after testing if you try.)

9. Relevant log output

10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /api/auth/v1/auth/session HTTP/1.1" 200 258 "http://10.0.0.10/web/logged-in"
10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /api/user/me/ HTTP/1.1" 200 1147 "http://10.0.0.10/web/logged-in"
10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /api/user/roles/ HTTP/1.1" 200 5816 "http://10.0.0.10/web/logged-in"

Reference: Previous report #11317 (locked). Re-submitted to meet the official bug report template.

Activity

  1. changed the title [-]Web UI stuck on /web/logged-in after login, no redirect to main app (template)[/-] [+]Web UI stuck on /web/logged-in after login, no redirect to main app[/+] on Feb 13, 2026
  2. chouswei commented on Feb 13, 2026

    @chouswei
    SponsorAuthor

    Additional detail

    Environment

    • Server: Raspberry Pi 5, Docker Compose; Caddy reverse proxy in front of InvenTree server.
    • Site URL: http://10.0.0.10 (no HTTPS).
    • Browsers tested: Chrome 145 (Windows), Edge 144 (Windows). Same behaviour on both for the stuck /web/logged-in screen.
    • Mobile app: InvenTree app (Dart/3.8) against the same server works; login and API usage are fine.

    Request flow (from server logs)

    1. User submits login from /web/login → POST /api/auth/v1/auth/login 200.
    2. Next requests from /web/login: GET /auth/ 200, GET /api/user/me/ 200, GET /api/user/roles/ 200 (session cookie is sent).
    3. UI navigates to /web/logged-in. From there: GET /api/auth/v1/auth/session 200, GET /api/user/me/ 200, GET /api/user/roles/ 200, GET /auth/ 200 — all with referrer http://10.0.0.10/web/logged-in.
    4. No further navigation: the page stays on /web/logged-in, and the frontend never redirects to the main app.
    5. If the user manually changes the URL to http://10.0.0.10/web/ and presses Enter, the app loads then redirects back to /web/logged-in, so there is no workaround.

    Edge-specific note

    On Edge, the session cookie is sometimes not sent on the first request after login (e.g. GET /api/auth/v1/auth/session returns 401 from /web/logged-in), so the login can appear to fail there. Chrome is more consistent. Cookie settings (INVENTREE_COOKIE_SAMESITE=False, INVENTREE_SESSION_COOKIE_SECURE=False) were tried and do not fix the stuck /web/logged-in redirect; the core issue is the frontend not navigating away from that route.

    Extended log excerpt (inventree-server)

    10.0.0.13 - - [13/Feb/2026:14:37:59 +0000] "POST /api/auth/v1/auth/login HTTP/1.1" 200 258 "http://10.0.0.10/web/login"
    10.0.0.13 - - [13/Feb/2026:14:37:59 +0000] "GET /auth/ HTTP/1.1" 200 0 "http://10.0.0.10/web/login"
    10.0.0.13 - - [13/Feb/2026:14:37:59 +0000] "GET /api/user/me/ HTTP/1.1" 200 1147 "http://10.0.0.10/web/login"
    10.0.0.13 - - [13/Feb/2026:14:37:59 +0000] "GET /api/user/roles/ HTTP/1.1" 200 5816 "http://10.0.0.10/web/login"
    10.0.0.13 - - [13/Feb/2026:14:38:14 +0000] "GET /web HTTP/1.1" 200 3153 "-"
    10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /api/auth/v1/auth/session HTTP/1.1" 200 258 "http://10.0.0.10/web/logged-in"
    10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /api/user/me/ HTTP/1.1" 200 1147 "http://10.0.0.10/web/logged-in"
    10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /api/user/roles/ HTTP/1.1" 200 5816 "http://10.0.0.10/web/logged-in"
    10.0.0.13 - - [13/Feb/2026:14:38:16 +0000] "GET /auth/ HTTP/1.1" 200 0 "http://10.0.0.10/web/logged-in"
    10.0.0.13 - - [13/Feb/2026:14:39:39 +0000] "GET /api/auth/v1/config HTTP/1.1" 200 430 "http://10.0.0.10/web/logged-in"
    10.0.0.13 - - [13/Feb/2026:14:39:39 +0000] "GET /api/ HTTP/1.1" 200 1979 "http://10.0.0.10/web/logged-in"
    10.0.0.13 - - [13/Feb/2026:14:39:40 +0000] "GET /api/auth/v1/auth/session HTTP/1.1" 200 258 "http://10.0.0.10/web/logged-in"
    

    All responses from /web/logged-in are 200; no 4xx/5xx. Backend and proxy are healthy; the issue is the web frontend not performing the redirect from /web/logged-in to the main application.

  3. arkajyotidas commented on Feb 13, 2026

    @arkajyotidas

    Yes, I am also facing the same issue, but I can log in through the mobile app.

  4. added
    setup
    triage:not-checked
    on Feb 13, 2026
  5. piskaotvaliska-31 commented on Feb 14, 2026

    @piskaotvaliska-31
  6. matmair commented on Feb 14, 2026

    @matmair
    Member

    @piskaotvaliska-31 I have hidden your dangerous recommendation. No one should do this, step 1 and 2 are a bad idea; step 3 ignores that our default deployment recommendations already ship with a reverse proxy.
    Only step 4 is correct in idea but not syntax. Please check the slop you post for correctness, or we will have to block you for the safety of the community.

  7. piskaotvaliska-31 commented on Feb 15, 2026

    @piskaotvaliska-31

    My solution is truly unconventional, but I've tried many different approaches to this problem, and this is the only one that worked for me. I'm just sharing my experience.

  8. matmair commented on Feb 15, 2026

    @matmair
    Member

    I can assure you as the programmer that did most of the MFA/SSO work that the config.yaml key csrf_trusted_origins does not exist - it is trusted_origins. I therefor doubt you actually tried this solution.

  9. arkajyotidas commented on Feb 15, 2026

    @arkajyotidas

    So, I got a temporary fix
    Log in to the /web/login, then go to /admin/
    Then click on view site, it will take you to /web/logged-in
    Then, click on the back button in the browser, and it will take you back to /web/home, then you guys can use the web dashboard.

    If you see the check input issues in the login screen dont need to worry. intersting fact is that we are getting logged into the admin interface

    This works in the docker

  10. GarnetKoebel commented on Feb 15, 2026

    @GarnetKoebel

    I also have this issue following an upgrade to 1.2.0 Login spins forever on /web/logged-in. Tested in Edge and Firefox.

    My install is via Docker Compose on a Ubuntu Server 24.04 LTS system.

    Suggested temp fix above does not work for me.

  11. added
    User Interface
    on Feb 15, 2026
  12. changed the issue type fromtoon Feb 15, 2026
  13. added this to the 1.2.1 milestone on Feb 15, 2026
  14. 7 remaining items

  15. AlfBaz commented on Feb 16, 2026

    @AlfBaz

    Probably not helpful but it may be noteworthy so I'll just put this here.

    I'm usually on the latest dev version, bare metal. ie 'git pull', 'invoke update' etc

    Already being loged in on 2 machines via http://192.168.0.240:8000 it would take me straight into the application after a brief "Checking if you are already logged in" message
    That version had all the commits up to Feb 3 2026 6af956f

    Carried out another 'git pull' on the 16th Feb, taking me to that latest commit Feb 15 2026 7a64694
    Now I'm getting the same as everyone else, spinning circle with "Checking if you are already logged in"

    Doing a git hard reset back to the previous "git rev-parse origin" hash number (033ad42) didn't return me back to previous state (ie letting me in)

    No reverse proxy or other intermediary thing just invoke dev.server -a 192.168.0.240:8000 plus a worker

  16. matmair commented on Feb 16, 2026

    @matmair
    Member

    @AlfBaz this actually helped; fix incoming

  17. self-assigned this
    on Feb 16, 2026
  18. StormTrooper commented on Feb 16, 2026

    @StormTrooper

    Unfortunately that didn't work for me. Still get the spinning circle and noticed in the devtools I'm getting a 404 on /auth/

    Image Image Image
  19. matmair commented on Feb 16, 2026

    @matmair
    Member

    @StormTrooper what? Being a bit more specific would help in this noisy issue

  20. StormTrooper commented on Feb 16, 2026

    @StormTrooper

    I've updated the file as per #11349 and restarted but it didn't resolve the logon issue for me.

    Image
  21. matmair commented on Feb 16, 2026

    @matmair
    Member

    @StormTrooper have you re-compiled the frontend manually? Just editing the files does nothing

  22. StormTrooper commented on Feb 16, 2026

    @StormTrooper

    Guess that's why it's not working for me :) Sorry for the noise. Will compile it.

  23. SchrodingersGat commented on Feb 16, 2026

    @SchrodingersGat
    Member

    Hi everyone, we have just released 1.2.1 which will arrive on dockerhub / installer in a couple of hours. Please update, and report back if you are still seeing this issue. Thanks to @matmair for fixing this one

  24. matmair commented on Feb 17, 2026

    @matmair
    Member

    Has anyone here validated that their problem was solved by 1.2.1 ?

  25. StormTrooper commented on Feb 17, 2026

    @StormTrooper

    Just upgraded and it's fixed my issue.

  26. AlfBaz commented on Feb 17, 2026

    @AlfBaz

    Apologies, I thought it was a given but yes. All sorted here

  27. sybren2 commented on Feb 18, 2026

    @sybren2

    Updating to 1.2.1 also solved this issue for me. We are indeed using http://<ip-address> (no HTTPS). Thanks for the fix!

    I do suggest that the Database Update Procedure be updated and refer to 1.2.1 instead of 1.2.0. Any user following the guide will (needlessly) run into the issue above.

  28. arkajyotidas commented on Feb 18, 2026

    @arkajyotidas

    yes, its working in my end too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

User Interfacesetup

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions