Login custom form.

53 views
Skip to first unread message

David Cope

unread,
Feb 15, 2022, 5:24:09 AM2/15/22
to Rodauth
Hello,

Currently setting up a Roda/roauth/sequel stack.

I'm having a hard time working out how to use my own login form as the /login page. I can get the rodauth login to work, but I have a styled login form as part of my web apps index page, but cannot gather from the docs the required context to make all of this work.

Any help would be very welcome.

Cheers,
David.

Jeremy Evans

unread,
Feb 15, 2022, 11:27:45 AM2/15/22
to rod...@googlegroups.com
On Tue, Feb 15, 2022 at 2:24 AM David Cope <david...@gmail.com> wrote:
Hello,

Currently setting up a Roda/roauth/sequel stack.

I'm having a hard time working out how to use my own login form as the /login page. I can get the rodauth login to work, but I have a styled login form as part of my web apps index page, but cannot gather from the docs the required context to make all of this work.

As long as your login form sets the expected parameters (which you can configure via login_param and password_param) and submits to the correct path, it should work.  However, if there is an error in the submission, then Rodauth will show its own login page.  You can configure that in 2 different ways.

* Use login_view configuration method to specify the HTML to use for the view.
* Have a login template in your Roda views folder.  Rodauth will pick it up automatically.

Thanks,
Jeremy

David Cope

unread,
Feb 19, 2022, 3:35:04 PM2/19/22
to Rodauth
Thanks very much. I will try these - I guess the template will be named "login.erb". I will look at the docs for login_param & password_param. I've got the stack working fine now, but it's just the styling of the form, but your suggestions will help a lot.

Cheers,
David.

Reply all
Reply to author
Forward
0 new messages