Devise strategy , authentication with login virtual attribute

If defined in Devise initializer ( User model must be updated) , it's possible to authenticate either with :email or :username