CSRF-X Auth Library - v1.0.3
    Preparing search index...

    Function isAuthenticationError

    • Determines if an error is related to authentication failure.

      Parameters

      • error: AuthError

        The AuthError instance to evaluate.

      Returns boolean

      true if the error indicates invalid credentials, expired CSRF,
      missing session, or insufficient permissions, otherwise false.

      Authentication errors typically require the application to re‑authenticate
      (e.g., redirect to login page, clear cached session).

      if (isAuthenticationError(err)) {
      redirectToLoginPage();
      }

      @public

      0.1.1