Replies: 7 comments 3 replies
-
Found a fix for this. So this is an option for HAML (yay): use Still hoping for a way to customize the rodauth views though, so I can avoid this |
Beta Was this translation helpful? Give feedback.
-
re 1, so my first thought was to customize my own local version of the gem, since it looks like the templates come from the And then I see this in the CHANGELOG which gives me some hope:
But I am not seeing any good writeup in the docs for how to go about doing this. And the mentioned #280 doesn't provide much help either. |
Beta Was this translation helpful? Give feedback.
-
Finally found http://rodauth.jeremyevans.net/rdoc/files/doc/login_rdoc.html (after seeing mention of I have 2 new questions now:
|
Beta Was this translation helpful? Give feedback.
-
In terms of finding the template to render, Rodauth always checks first if you have defined the template in your application, if you have haml as the default render engine in your Roda app, that would be The difference between auth methods and auth value methods is that auth value methods also allow specifying a value during configuration, while auth methods require a block. Auth value methods are used for things that may not depend on the currently logged in user. For example, in your rodauth configuration, as base_url "https://something.com"
# or
base_url do
"https://something.com"
end However, as logged_in? do
true
end But you cannot do: logged_in? true Because the value of |
Beta Was this translation helpful? Give feedback.
-
thank you.
this is great, thank you! It looks to me (at least based on one quick test, overriding Also for my own curiosity, would the code for checking for templates be in
thank you. Could you help me understand where the code would be for these methods (both auth, and auth value)? as an example, I tried to search for |
Beta Was this translation helpful? Give feedback.
-
Correct.
It's in
Rodauth heavily uses metaprogramming internally to reduce duplication as well as provide simple configuration to the user. A brief overview is at https://rodauth.jeremyevans.net/rdoc/files/doc/guides/internals_rdoc.html. For full details, you would want to review |
Beta Was this translation helpful? Give feedback.
-
thank you again, Jeremy! Specifically on customizing the login page, is it possible to only have one password input for the create-account page? My thought is to make the registration process less painful and if a mistake is made on the password entry, the user can always do a reset if they keyed in the password wrongly. |
Beta Was this translation helpful? Give feedback.
-
is there a way to customize the standard HTML that rodauth gives you (e.g. for
/login
,/logout
, etc.)?(resolved, sort of; see follow-up comment below)
I'm noticing with HAML (usingplugin :render, engine: 'haml'
in roda) that instead of getting the actual HTML, I get escaped HTML (so for/login
, I get this:<form method="post" class="rodauth" role="form" id="login-form"> ...
). I'm still trying to figure this out, and I know this is sort of a HAML thing... but I am also hoping that I can resolve this easily, so that I dont have to switch to using ERB just because rodauth is.Beta Was this translation helpful? Give feedback.
All reactions