Rails is the most widely used framework in the ruby ecosystem, by far. Its feature and capabilities are wide, and as a consequence, most of the OAuth libraries which work in rails, only work in Rails (ex: doorkeeper). The same can be said of the authentication case (ex: devise)
However, rodauth-rails changed that! It integrates
rodauth with the rails feature set, by bringing:
and everything that one can expect from a rails app.
First thing you’ll have to do is install and integrate rodauth-rails.
Once you do it, you can then:
> rails generate rodauth:oauth:install
rodauth-oauthdoes not use them internally, so feel free to update and use them yourself);
> rails generate rodauth:oauth:views
app/viewswith the authorize form;
which you can then tweak according to your requirements.
rodauth-specific configuration can be found under
lib/rodauth_app.rb. It’s there where you’ll have to enable the feature:
# in lib/rodauth_app.rb plugin :rodauth do enable :oauth ...
And that’s it, really.