If you want to read about migrating a basic Rails application from Devise to Rodauth, go to Basics. For an guide about how to migrate RSpec specs, go to RSpec.
If you have followed the basics guide, you should already have removed Devise
from your User model (and omniauth with it). This guide explains how to
re-add omniauth and add the necessary configuration.
Adding OmniAuth
To add the rodauth-omniauth gem, run bundle add rodauth-omniauth. At the
same time, you can remove omniauth-rails_csrf_protection with
bundle remove omniauth-rails_csrf_protection, since it is no longer needed.
Create the necessary migrations for Rodauth-OmniAuth. This blog will probably get outdated in the future, so please check the gems documentation to get the latest schema needed. Run the migration.
To enable OmniAuth, modify app/misc/rodauth_main.rb and add OmniAuth to the
list of enabled features, and add the omniauth configuration. You can usually
copy the configuration from the Devise initializer.
enable :create_account, :verify_account, ...,
+ :omniauth
+ omniauth_provider :facebook, ENV["FACEBOOK_APP_ID"], ENV["FACEBOOK_APP_SECRET"], scope: "email"