Ash FrameworkAF
Ash Framework3y ago
66 replies
frankdugan3

ashauthentication: possible bugs?

I have a couple errors coming up with AshAuthentication, not sure if they're bugs or me doing something wrong.

1) If I disable registration:
strategies do
  password :password do
    identity_field :email
    registration_enabled? false

I get this error:
[error] #PID<0.22797.0> running Phoenix.Endpoint.SyncCodeReloadPlug (connection #PID<0.22796.0>, stream id 1) terminated
Server: localhost:4000 (http)
Request: GET /sign-in
** (exit) an exception was raised:
    ** (KeyError) key :type not found in: nil. If you are using the dot syntax, such as map.field, make sure the left-hand side of the dot is a map
        (ash_phoenix 1.2.10) lib/ash_phoenix/form/form.ex:396: AshPhoenix.Form.for_action/3
        (ash_authentication_phoenix 1.6.4) lib/ash_authentication_phoenix/components/password/register_form.ex:59: AshAuthentication.Phoenix.Components.Password.RegisterForm.update/2
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/utils.ex:484: Phoenix.LiveView.Utils.maybe_call_update!/3
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:661: anonymous fn/5 in Phoenix.LiveView.Diff.render_pending_components/6
        (elixir 1.14.3) lib/enum.ex:2468: Enum."-reduce/3-lists^foldl/2-0-"/3
        (stdlib 4.2) maps.erl:411: :maps.fold_1/3
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:635: Phoenix.LiveView.Diff.render_pending_components/6
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/diff.ex:146: Phoenix.LiveView.Diff.render/3
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/static.ex:252: Phoenix.LiveView.Static.to_rendered_content_tag/4
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/static.ex:135: Phoenix.LiveView.Static.render/3
        (phoenix_live_view 0.18.18) lib/phoenix_live_view/controller.ex:39: Phoenix.LiveView.Controller.live_render/3
        (phoenix 1.7.2) lib/phoenix/router.ex:430: Phoenix.Router.__call__/5
        (hsm 0.8.0) lib/hsm_web/endpoint.ex:1: HsmWeb.Endpoint.plug_builder_call/2
        (hsm 0.8.0) lib/hsm_web/endpoint.ex:1: HsmWeb.Endpoint."call (overridable 3)"/2
        (hsm 0.8.0) lib/plug/debugger.ex:136: HsmWeb.Endpoint."call (overridable 4)"/2
        (hsm 0.8.0) lib/hsm_web/endpoint.ex:1: HsmWeb.Endpoint.call/2
        (phoenix 1.7.2) lib/phoenix/endpoint/sync_code_reload_plug.ex:22: Phoenix.Endpoint.SyncCodeReloadPlug.do_call/4
        (plug_cowboy 2.6.1) lib/plug/cowboy/handler.ex:11: Plug.Cowboy.Handler.init/2
        (cowboy 2.9.0) /home/frank/git/hsm-tmp-release-branch/deps/cowboy/src/cowboy_handler.erl:37: :cowboy_handler.execute/2
        (cowboy 2.9.0) /home/frank/git/hsm-tmp-release-branch/deps/cowboy/src/cowboy_stream_h.erl:306: :cowboy_stream_h.execute/3

2) When I try to open a password reset link, I get the following error:
Was this page helpful?