Comments (6)
I will note, it'll work just fine to forgo the pow_user_fields()
in my schema and do it explicitly. 😃
schema "admin_users" do
field :email, :string
field :password, :string, virtual: true
field :current_password, :string, virtual: true
field :confirm_password, :string, virtual: true
field :password_hash, :string, [source: :encrypted_password]
end
from pow.
It's exactly what I'm testing out 😄 I like if it could be something as explicit. Maybe like this:
schema "admin_users" do
field :password_hash, :string, [source: :encrypted_password]
pow_user_fields()
end
And the pow_user_fields/0
will just ignore that field (the Ecto field/3
macro registers a module attribute with all the fields so would be easy enough to ignore).
from pow.
Would you need to keep both the rails and phoenix app running at the same time? If not, then I think the best would be to create a migration to rename the column.
It would be pretty easy to add a password_hash_field
like the existing user_id_field
configuration, but I'll check if there is a better way of handling this situation.
from pow.
Yes, we'd be going for the incremental migration--pulling over individual contexts one at a time, while keeping more complex logic that's established in the rails app--smaller surface area gets moved first, then we'll step up slowly over time as the phoenix app is proved stable.
I believe a lot of rails apps will be taking this approach (and migrating from devise).
from pow.
I've got a PR up: #21
from pow.
I approve. 👏
from pow.
Related Issues (20)
- Replacing Phoenix.Token with JWT-based for signing and verifiying of tokens HOT 1
- Unable to logout user in Pow API HOT 2
- Feature Request: Apple Passkeys HOT 1
- Pow.Plug.authenticate_user/1 performance HOT 2
- Reset password - test fails issue HOT 1
- Upgrading to Phoenix 1.7 HOT 5
- Create account without email/password using some unique ID?
- Phoenix 1.7 compilers warning HOT 1
- Maintain case when storing emails HOT 2
- Permissions issues with mnesia backend for Pow HOT 15
- Improve mix tasks
- Crash @missing_field? in Schema.ex HOT 1
- Inject values on registration HOT 2
- users_context seems to be ignored HOT 1
- Upgrading POW from 1.6 to 1.7 HOT 12
- Changeset errors into view HOT 1
- POW & LiveView - best way to implement `assigns.current_user` ? HOT 7
- Elixir 1.15 deprecation warnings HOT 1
- Persistence of stale session ids in MnesiaCache HOT 10
- Phoenix 1.6 App upgraded to 1.7 warning about layout conflicts. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pow.