def update_modified_providers_after_save
      # Save password provider
      if @password_updated or @username_updated
        Challah.providers[:password].save(self)
        @password_updated = false
        @username_updated = false
        @password = nil
      end

      # Save any other providers
      Challah.custom_providers.each do |name, klass|
        custom_provider_attributes = provider_attributes[name]

        if custom_provider_attributes.respond_to?(:fetch)
          if klass.valid?(self)
            klass.save(self)
          end
        end
      end
    end
def update_modified_providers_after_save
      # Save password provider
      if @password_updated or @username_updated
        Challah.providers[:password].save(self)
        @password_updated = false
        @username_updated = false
        @password = nil
      end

      # Save any other providers
      Challah.custom_providers.each do |name, klass|
        custom_provider_attributes = provider_attributes[name]

        if custom_provider_attributes.respond_to?(:fetch)
          if klass.valid?(self)
            klass.save(self)
          end
        end
      end
    end
If password or username was changed, update the authorization record