Skip to content
This repository was archived by the owner on Nov 23, 2026. It is now read-only.
This repository was archived by the owner on Nov 23, 2026. It is now read-only.

[OCISDEV-128] The logon page cannot be open after the user been deleted #9562

Closed

Description

@shishouyuan

Describe the bug

When I delete my old user account and want to logon as a new user, I can not open the logon page. It will always jump to the error page until I clear the browser data.

Here is the url of the error page.
https://domain-name/oidc-callback?error=server_error&error_description=user%20not%20found&state=c374ef87980e4e3ab279697ac6242c2a

Steps to reproduce

Steps to reproduce the behavior:

  1. Logon with user one, DO NOT logout.
  2. Using the admin user to delete user one in another browser (or private mode).
  3. Open the homepage of ocis in the first browser, and the error comes up.

Expected behavior

Show the error and jump to logon page.

Actual behavior

Only show the error and provide no way to logon again.

Setup

  • ownCloud Infinite Scale: 3.1.0-next.2+9b4244b08
  • Web client: 7.0.1

Activity

  1. added
    Type:Bug
    on Jun 30, 2023
  2. rhafer commented on Aug 9, 2023

    @rhafer

    I can confirm this. Deleting the logon cookie set by the lico IDP makes things work again. I am not 100% but this looks like an issue with the web ui to me.

  3. transferred this issue fromowncloud/ocison Aug 9, 2023
  4. rhafer commented on Aug 9, 2023

    @rhafer

    Shouldn't the cookie be deleted when showing that

    Logged out
    You were automatically logged out for security reasons.
    
    ownCloud – A safe home for all your data
    

    Page?

  5. added theissue type on Mar 21, 2025
  6. removed
    Type:Bug
    on Mar 21, 2025
  7. moved this from Qualification to Backlog in Infinite Scale Team Boardon Mar 26, 2025
  8. self-assigned this
    on Mar 26, 2025
  9. moved this from Backlog to In progress in Infinite Scale Team Boardon Mar 26, 2025
  10. moved this from In progress to blocked in Infinite Scale Team Boardon Mar 28, 2025
  11. removed their assignment
    on Mar 31, 2025
  12. kobergj commented on Apr 7, 2025

    @kobergj
    Collaborator

    Needs discussion and proper planning

  13. moved this from blocked to No status in Infinite Scale Team Boardon Apr 7, 2025
  14. changed the title [-]The logon page cannot be open after the user been deleted[/-] [+][OCISDEV-128] The logon page cannot be open after the user been deleted[/+] on Oct 20, 2025
  15. DeepDiver1975 commented on Jun 30, 2026

    @DeepDiver1975
    Contributor

    Triage (no repro on a current build): the underlying server_error&error_description=user not found is returned by the IDP/oCIS auth backend when the still-cached session points at a now-deleted user — that part is server-side, outside owncloud/web. The web-frontend angle is the dead-end you describe: error page with no path back to login until browser data is cleared.

    That frontend path has changed since this was filed (oCIS 3.1.0-next, web 7.0.1 → web is now v12.4.x). signInCallback now wraps signinRedirectCallback in try/catch and routes failures through handleAuthError, which calls removeUser('authError') (clears the cached user/session) and shows the accessDenied screen rather than looping (packages/web-runtime/src/services/auth/authService.ts).

    Can someone still reproduce a no-way-back login dead-end on a current web release? If yes, please attach the web version + console/network trace of the /oidc-callback redirect. Without a current repro on the web side this doesn't look actionable here.

    🤖 Generated with Claude Code

  16. LukasHirt commented on Jun 30, 2026

    @LukasHirt
    Collaborator

    Can someone still reproduce a no-way-back login dead-end on a current web release? If yes, please attach the web version + console/network trace of the /oidc-callback redirect. Without a current repro on the web side this doesn't look actionable here.

    Yes, the issue can still be reproduced with the current stable v12.4.1.

  17. DeepDiver1975 commented on Jun 30, 2026

    @DeepDiver1975
    Contributor

    @LukasHirt thanks for confirming on v12.4.1 — and apologies, my prior comment was wrong on the mechanism.

    Re-checked the v12.4.1 source. The accessDenied page IS reached (so no infinite redirect loop), and it shows a "Log in again" button → routes to login/loginUrl, which restarts signinRedirect (packages/web-runtime/src/pages/accessDenied.vue, authService.handleAuthError). The dead-end is real and is what rhafer diagnosed: web's recovery only calls userManager.removeUser('authError'), which clears web's own oidc-client user — it does NOT clear the IDP's logon cookie. So "Log in again" bounces back through the IDP, which still holds a session for the now-blocked/deleted user and immediately returns server_error&error_description=user not found, landing back on accessDenied. Clearing the browser cookie is the only escape, matching the original report.

    So: confirmed still-reproducible, web side. The missing piece is an IDP-level logout (e.g. routing the recovery through signoutRedirect/end-session so the IDP cookie is dropped) rather than just removeUser. Whether that belongs in web or in the IDP/oCIS auth backend is the design call kobergj flagged for discussion — but the no-way-back UX is web-observable. Not retracting the bug.

    🤖 Generated with Claude Code

  18. dj4oC commented on Jul 8, 2026

    @dj4oC
    Contributor

    Implementation prompt

    Problem: When a logged-in user's account is deleted server-side, the IdP still holds a session cookie for them. On return to the app, handleAuthError() only calls userManager.removeUser('authError'), which clears web's own oidc-client user/session but never touches the IdP's session cookie. The accessDenied page's "Log in again" action re-triggers signinRedirect, which bounces straight back through the IdP using its still-live (now-invalid) session cookie, immediately returning server_error&error_description=user not found and landing back on accessDenied — a dead end that only clearing browser cookies escapes. Confirmed still reproducible on v12.4.1 per @LukasHirt's comment on this issue.

    Acceptance criteria:

    • After this specific failure (auth error while an IdP session cookie exists for a user that no longer resolves), the recovery path clears the IdP-side session (e.g. via signoutRedirect/end-session) in addition to removeUser, so that clicking "Log in again" reaches a fresh, working login prompt instead of looping back to accessDenied.
    • Normal auth-error handling for other cases (expired token, generic 401) is unchanged.
    • A test (unit or e2e) simulates the "user not found" IDP error on signInCallback/initializeContext and asserts the subsequent login attempt succeeds rather than re-erroring.

    Files:

    • packages/web-runtime/src/services/auth/authService.ts — handleAuthError() and logoutUser(); on the specific case where the IdP itself is rejecting the session as unresolvable, route through signoutRedirect/the end-session flow (already used in logoutUser() for normal logout) instead of only removeUser('authError').
    • packages/web-runtime/src/pages/accessDenied.vue — verify the "Log in again" action still calls the same login path after the above change; update if it needs to invoke a different recovery entry point.

    Constraints:

    • Test coverage ≥ 85% on touched code (e2e preferred — run the tool, do not trust claimed %)
    • WCAG 2.2 compliance for any changes to the accessDenied UI
    • REUSE 3.3 license/copyright headers on new/modified files
    • GPG-signed commit + DCO Signed-off-by
    • Rebase onto base branch before pushing
    • No root-directory edits
    • Whether this belongs in web (client-side end-session trigger) or requires IDP/oCIS-side changes was flagged by a maintainer as needing discussion (comment by @kobergj) — confirm the chosen approach before implementing.

    🤖 Automated by Claude Code


    Generated by Claude Code

  19. DeepDiver1975 commented on Jul 14, 2026

    @DeepDiver1975
    Contributor

    This repository is being archived and is no longer maintained. Closing this as part of archival. Thank you for your contribution.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions