Releases: janko/rodauth-rails
2.1.2
2.1.1
2.1.0
-
Added configuration for skipping loading of the Tilt gem, which Rodauth uses to render built-in view & email templates.
# config/initializers/rodauth.rb Rodauth::Rails.configure do |config| # ... config.tilt = false # skip loading Tilt gem end
This is useful when you've imported all view & email templates into your app, and want to get rid of the extra dependency.
-
The
rodauth:routesrake task now displays the route name:$ rails rodauth:routes
Routes handled by RodauthApp: login GET|POST /login rodauth.login_path create_account GET|POST /create-account rodauth.create_account_path verify_account_resend GET|POST /verify-account-resend rodauth.verify_account_resend_path verify_account GET|POST /verify-account rodauth.verify_account_path change_password GET|POST /change-password rodauth.change_password_path change_login GET|POST /change-login rodauth.change_login_path logout GET|POST /logout rodauth.logout_path remember GET|POST /remember rodauth.remember_path reset_password_request GET|POST /reset-password-request rodauth.reset_password_request_path reset_password GET|POST /reset-password rodauth.reset_password_path verify_login_change GET|POST /verify-login-change rodauth.verify_login_change_path close_account GET|POST /close-account rodauth.close_account_pathThis is useful if you're using
rodauth.current_routeor have controller callbacks for specific Rodauth actions. -
The optional dependencies added to the Gemfile by
rodauth:installgenerator are now longer eagerly loaded. This helps speed up boot time in development.# Gemfile # ... gem "sequel-activerecord_connection", require: false gem "bcrypt", require: false gem "tilt", require: false
-
Rails 5.1+ is now required.
2.0.2
2.0.1
-
The built-in mailer class now resolves correctly when email deliveries are processed by a separate background job process in development. This should fix the
NameError: uninitialized constant Rodauth::Rails::Featureerrors.The mailer class was renamed from
Rodauth::Rails::Feature::Email::MailertoRodauth::Rails::Mailer, so any previously enqueued email deliveries will fail. However, the built-in mailer shouldn't be used in production anyway.
2.0.0
Breaking changes
-
The
sequel-activerecord_connection,bcryptandtiltgems are now optional dependencies. For new projects,rodauth:installwill automatically add them to yourGemfile.For existing projects, you should add them back as needed:
$ bundle add sequel-activerecord_connection --require false # unless you're using Sequel as your primary ORM $ bundle add after_commit_everywhere --require false # not needed on Rails 7.2+ $ bundle add bcrypt --require false # unless you're using argon2 $ bundle add tilt --require false # not needed if you're not rendering any built-in view/email templates and have Roda rendering disabled, see https://github.com/janko/rodauth-rails/wiki/Skip-Tilt
-
The built-in
#current_accountcontroller method has been removed. It has been soft-deprecated for a while now, but it's not ergonomic enough for secondary Rodauth configurations.Existing applications should define their own that delegate to
rodauth.rails_account, for example:class ApplicationController < ActionController::Base private # primary configuration def current_account rodauth.rails_account end end
class Admin::ApplicationController < ActionController::Base private # secondary configuration def current_admin rodauth(:admin).rails_account end end
-
Removed deprecated
Rodauth::Rails::Modelclass. This shouldn't affect you if you've been usingRodauth::Rails.model. -
Removed deprecated
Rodauth::Rails.authenticatedrouting constraint. You should be usingRodauth::Rails.authenticateinstead. -
Support for Rails 5.0 has been dropped.
-
Support for Ruby 2.5 has been dropped.
Other improvements
-
The
--jwtoption for therodauth:installgenerator automatically adds thejwtgem to the Gemfile. -
The
--argon2option for therodauth:installgenerator automatically adds theargon2gem to the Gemfile. -
Added check constraint to generated Active Record migration on Postgres for the accounts table that verifies basic email format. This makes it consistent with the Sequel migration.
-
Install instructions are now skipped if
--jsonor--jwtflag was specified, as those are mostly specific to HTML mode anyway.
1.15.2
1.15.1
- Don't pass keyword arguments to
enumon generated account model for Rails 8.0 compatibility. - Show configuration suggestion for
otp_unlockfeature if generating its migration with a table prefix. - Remove
require_login_redirect { login_path }from generated configuration, as that's now the default in Rodauth. - Simplify installation instructions, cutting the number of lines by 50%.
1.15.0
New features
-
Migrations and view/email templates have been added for the new otp_unlock, otp_lockout_email, otp_modify_email and webauthn_modify_email features added in Rodauth 2.36.
-
New
rodauth:mailergenerator has been added to accommodate for the increased number of possible emails. Mailer integration isn't generated byrodauth:installgenerator anymore. -
The
rodauth.rails_url_optionshash can now be overridden at runtime. This is useful when different mailers have different URL options (e.g. subdomains).class RodauthMailer < ApplicationMailer # ... def rodauth(name, account_id, &block) instance = RodauthApp.rodauth(name).allocate instance.account_from_id(account_id) instance.rails_url_options.merge!(default_url_options) # merge current default URL options instance.instance_eval(&block) if block instance end end
Bug fixes
-
The model instance returned by
rodauth.rails_accountis now refreshed whenrodauth.accountchanges. This fixes integration with rodauth-become_account gem. -
Fixed error on Rails 7.2 when Rodauth attempts to redirect to a URLs with query parameters.
Other improvements
-
The generated mailer now uses
rodauth.account_from_idadded in Rodauth 2.36 for setting the current account. -
Explicit index names have been removed from generated migrations in favor of default index names.
-
Added missing email template for the reset_password_notify feature.
-
The generated Rodauth configuration no longer enables the change_password_notify feature.
-
The generated
webauthn_removeview template now usesrodauth.strftime_formatfor displaying last use. -
The
convert_token_id_to_integer?configuration is now skipped on install when Sequel is used as primary ORM.