Ash FrameworkAF
Ash Framework3y ago
49 replies
Jason

Assumption failed: Action does not correlate with an authentication strategy

Follow up question related to https://github.com/ash-project/ash/issues/516
The same error persists after adding change set_context(%{strategy_name: :password})
   update :change_user_timezone do
      argument :user_timezone, :string do
        allow_nil? true
      end

      change set_attribute(:user_timezone, arg(:user_timezone))
    end

    update :change_user_password do
      argument :hashed_password, :string do
        allow_nil? true
      end

      argument :password_confirmation, :string do
        allow_nil? true
        sensitive? true
      end

      argument :password, :string do
        allow_nil? true
        sensitive? true
      end

      # https://github.com/ash-project/ash/issues/516
      change set_context(%{strategy_name: :password})    #### THIS DIDN"T FIX THE PROBLEM
      validate AshAuthentication.Strategy.Password.PasswordConfirmationValidation

      change AshAuthentication.Strategy.Password.HashPasswordChange
      change AshAuthentication.GenerateTokenChange
GitHub
Describe the bug The following error when running validation of a password change form. iex(1)> [debug] HANDLE EVENT View: MyAppWeb.UserLive.UserSettings Event: "validate_password&a...
This error was unhandled because it did not implement the `AshPhoen...
Was this page helpful?