The widely used gem Devise serves as the basis for user authentication in Hitobito
Additional attributes can be defined in a wagon which can be used as the ID of the person for login. For example, instead of just the main e-mail (default), a member a member number can also be used for the login.
module SacCas::Person
extend ActiveSupport::Concern
included do
...
self.devise_login_id_attrs << :membership_number
...
end
end