0

特別なアクセス領域のために、二次認証レイヤーを実行する必要があります。そのため、ログイン後、ユーザーはその後再度ログインできます。私はすでに通常の認証にDeviseを使用しているため、パスワードフィールドはもう使用できず、has_secure_password Railsのbultin機能も使用できません。

100% 手動以外に代替手段はありますか?

私は調査を行い、BCrypt で代替案を見つけました。しかし、パスワードソルトフィールドが必要であることがわかりました。塩田を必要としない解決策はありますか?

4

1 に答える 1

1

Why not add a role to your user model - option 2 here https://github.com/plataformatec/devise/wiki/How-To:-Add-an-Admin-Role

If you really need 2 logins, you can have 2 entirely different devise models- see Configuring multiple models In the readme https://github.com/plataformatec/devise

于 2013-02-26T19:24:38.080 に答える