Using ActiveRecord's encrypt feature over rodauth's account table? #196
Replies: 2 comments 4 replies
-
Glad to hear that 🙂
Rodauth doesn't use Active Record models for database interaction, so that encryption setting is skipped. rodauth-rails uses the model only for I would have to check how Active Record implements its encryption, and see if Rodauth could be overridden to do the same. |
Beta Was this translation helpful? Give feedback.
-
Hi @janko — I'm working with @fmborghino above. We've made some progress in the direction of encrypting emails through Sequel ColumnEncryption. Here's what we're trying so far:
But now RodauthRails is crashing when we call
We suspect Rodauth::Rails.model is expecting a hash from Rodauth, but we've changed that to a Model with ColumnEncryption. Do you think that's the problem? Do you think we're going to have pain every step of the way with this approach? —Winston |
Beta Was this translation helpful? Give feedback.
-
First off, thanks for
rodauth-rails
- really nice to use!We're hoping to keep all our user PII encrypted, and already use Rails 7 ActiveRecord's
encrypt
feature for this. What we would like to do is setup our account model to use this. Am I missing something on how to haverodauth-rails
make this work, or is this a feature that isn't implemented?Here's a snippet that I think sums up what we're hoping to do:
app/models/account.rb
Hope this makes sense! Thanks for any pointers.
Beta Was this translation helpful? Give feedback.
All reactions