Comments (5)
Aha - the problem was that my username had a space in it, and the hashing code in lib/data/user.ex requires a valid changeset:
defp hash_password(changeset) do
case changeset do
%{valid?: true, changes: %{password: password}} ->
put_change(changeset, :password_hash, Comeonin.Bcrypt.hashpwsalt(password))
_ ->
changeset
end
end
Verified that changing the username to a valid one removes the password error.
from ex_venture.
This appears to be related to hashing; changing the line
<%= error_tag f, :password_hash %>
to
<%= error_tag f, :password %>
in web/templates/registration/new.html.eex allows the account to be created after fixing other validation errors.
from ex_venture.
Hmm, I was able to make an account locally without issue. Did your passwords match? It might be that along with what you just found. I was able to get the proper warnings with a miss-match.
from ex_venture.
Any ideas on the best way of going about improving this? The error message is misleading, but there isn't much sense in hashing the password until creating the user, either. Should the template just show errors for :password
under that field, and throw more serious errors about a server-side problem if :password_hash
is problematic?
from ex_venture.
Yeah I'm not sure. Might be worth switching the password field to using error_tag(f, :password)
. Might be some other small tweaks that need to happen but this is a good start.
from ex_venture.
Related Issues (20)
- Proficiencies TODO
- Use command can target characters
- Trying again to install via docker HOT 5
- Dockerfile still uses elixir 1.8
- Can't run `mix ecto.reset` HOT 1
- Seeds broken / Query error when booting up app HOT 1
- can't seem to compile dependency: kalevala HOT 1
- Private Dep HOT 1
- Seeds Broken HOT 1
- Migration issue HOT 3
- Ecto.InvalidChangesetError when applying seed during setup HOT 2
- Player already in room upon entering HOT 3
- Wrong target still attacks current target HOT 1
- get 0 gold works HOT 1
- Wrong lines order for NPC entering HOT 2
- Overworld TODO
- Performance Testing
- Stats/boost gives error when saving HOT 1
- Problem with docker set up 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 ex_venture.