-
Hello! I'm having some strange issue when trying to call the login endpoint via POST with a JSON body. To be precise, when I make this call via curl or similar:
I get the following response:
And a look at the rails output reveals these SQL queries:
Especially this line is interesting:
It seems the credentials passed to the controller are not handed to rodauth somehow. I'm not sure whether I misconfigured my app or if there is some other issue at play here, but my configuration looks as follows:
And my user model is also straight forward:
Does anyone have an idea what could be wrong here? I'm using Ruby 3.2.0, rodauth 2.26.1 and rodauth-rails 1.7.0 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
I believe the issue might be in |
Beta Was this translation helpful? Give feedback.
I believe the issue might be in
login_param
being passed a symbol, where it probably needs to be a string. Roda uses Rack's default params, which don't provide indifferent access that Active Support does, so params need to be access via string keys. Could you try whether it works withlogin_param "username"
?