Hi,I have a few questions regarding rodauth and sequel:1.How do you get the current_user when using jwt in rodauth?Is there a current_user helper or something similar?should I just do the following:Account.find(id: rodauth.account_from_session[:id])
2.When saving a new record in sequel and there’re validators in model, it raises an error instead of returning a validation message.eg:Sequel::Model.plugin :validation_helpersdef validatesupervalidates_min_length 5, :bodyend—it’s not possible to do:if post.save{success: “”}.to_jsonelse{error: post.errors...}.to_jsonendbut something like this will workpost.safe{success: “”}.to_jsonrescue{error: post.errors…}.to_jsonHow should such things be done?
3.After setting custom routes for rodauth I had complains that login didn’t match and then there’s no password confirmation messages.(Not sure why it asked for login confirmation). I added the last 2 lines from the code below and it solved the problem.Interesting, it returned validation messages to the console(without raising an error)Is this the expected behaviour?prefix “auth”login_route “signin”require_login_confirmation? falserequire_password_confirmation? false
4. Is it possible to replace {login: “”, password: “”} to {email: “”, password: “”} when making a post request to signin/signup route?