Closed woller closed 9 months ago
The login param name was changed from login
to email
in newer rodauth-rails versions, to be more in line with people's expectations from other Rails-based authentication frameworks. I forgot to update the wiki page, I will do that shortly.
That was the issue. I really should have spotted that in the server logs 🙂 Thanks so much!
I ran into a problem, when I tried to implement a login test helper. Even though the login flow works perfectly in development (thanks for that, by the way 🙂), I cannot make it work during testing.
I've tried omitting
as: :json
without any effect.The test I am writing is simple:
I'm using the account fixture generated by the engine without any modifications:
I don't really know how to debug this, as the only response I get back from the
login
-method is 401 as an integer. I am onrodauth-rails 1.11.0
andrails 7.0.8
in a fresh Rails app. I even tried spinning up a new rails app (available here) and was able to reproduce the error.