TrestleAdmin / trestle-auth

Authentication plugin for the Trestle admin framework
https://trestle.io
GNU Lesser General Public License v3.0
53 stars 22 forks source link

can not login if "config.authentication_keys" in devise is not ":email" #33

Closed chenjau closed 3 years ago

chenjau commented 3 years ago

Hi, just figured it out that if config.authentication_keys in config/initializers/devise.rb is not :email, trestle-auth login will fail. thanks.

reference: How To: Allow users to sign in using their username or email address

spohlenz commented 3 years ago

You can set config.auth.authenticate_with to the name of your login parameter (e.g. :login or :username). In trestle-auth 0.4.3, I have updated the Devise generator to automatically choose the most appropriate (single) field based on Devise.authentication_keys.

Apologies for the very late response.