Skip to content

notAllowedError not cleared after successful login in useValidateAuthenticator.tsx #708

@istvansipos1983

Description

@istvansipos1983

Summary:

Once notAllowedError is set in useValidateAuthenticator, it is never cleared, even after a successful login. This causes canAccessMainView to remain false, effectively locking the user out of the CMS until a full page reload.

Steps to Reproduce:

  1. Set up an Authenticator that returns false or throws an error (e.g. based on user role)
  2. Attempt login with a user who should not have access:
  • notAllowedError is set
  • The error message is correctly displayed
  1. Log in with a user who should be allowed:
  • Authenticator returns true
  • authController.user is updated
  • But notAllowedError remains set
  • canAccessMainView remains false
  • User remains stuck in the Login screen

Expected Behavior:

When Authenticator returns true, and a new user is authenticated, the internal notAllowedError should be cleared (e.g. set to false) so that canAccessMainView becomes true and the main CMS interface is shown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions