Magic link with registration does not work.
This works just fine if I turn registration off.
Now, sign in fails with invalid username/password error message if I enable registration and use the following action
This is a brand new ash/phoenix project.
Any ideas of what may be happening?
read :sign_in_with_magic_link do
description "Sign in or register a user with magic link."
argument :token, :string do
description "The token from the magic link that was sent to the user"
allow_nil? false
end
# upsert? true
# upsert_identity :unique_email
# upsert_fields [:email]
# Uses the information from the token to create or sign in the user
# change AshAuthentication.Strategy.MagicLink.SignInChange
prepare AshAuthentication.Strategy.MagicLink.SignInPreparation
metadata :token, :string do
allow_nil? false
end
end read :sign_in_with_magic_link do
description "Sign in or register a user with magic link."
argument :token, :string do
description "The token from the magic link that was sent to the user"
allow_nil? false
end
# upsert? true
# upsert_identity :unique_email
# upsert_fields [:email]
# Uses the information from the token to create or sign in the user
# change AshAuthentication.Strategy.MagicLink.SignInChange
prepare AshAuthentication.Strategy.MagicLink.SignInPreparation
metadata :token, :string do
allow_nil? false
end
endNow, sign in fails with invalid username/password error message if I enable registration and use the following action
create :sign_in_with_magic_link do
description "Sign in or register a user with magic link."
argument :token, :string do
description "The token from the magic link that was sent to the user"
allow_nil? false
end
upsert? true
upsert_identity :unique_email
upsert_fields [:email]
# Uses the information from the token to create or sign in the user
change AshAuthentication.Strategy.MagicLink.SignInChange
metadata :token, :string do
allow_nil? false
end
end create :sign_in_with_magic_link do
description "Sign in or register a user with magic link."
argument :token, :string do
description "The token from the magic link that was sent to the user"
allow_nil? false
end
upsert? true
upsert_identity :unique_email
upsert_fields [:email]
# Uses the information from the token to create or sign in the user
change AshAuthentication.Strategy.MagicLink.SignInChange
metadata :token, :string do
allow_nil? false
end
endThis is a brand new ash/phoenix project.
Any ideas of what may be happening?
