In https://github.com/manukall/phoenix_token_auth/blob/master/lib/phoenix_token_auth/registrator.ex , line 34,
def set_hashed_password(changeset = %{errors: [_]}), do: changeset
will not match in case of several errors. So, if the changeset has several errors, the hashed password will be returned.
A correction would be :
def set_hashed_password(changeset = %{errors: [ _ | _ ]}), do: changeset
In https://github.com/manukall/phoenix_token_auth/blob/master/lib/phoenix_token_auth/registrator.ex , line 34,
def set_hashed_password(changeset = %{errors: [_]}), do: changeset
will not match in case of several errors. So, if the changeset has several errors, the hashed password will be returned.
A correction would be :
def set_hashed_password(changeset = %{errors: [ _ | _ ]}), do: changeset