flask-bcrypt - ValueError: Invalid salt

后端 未结 11 1508
北海茫月
北海茫月 2020-12-29 07:57

I was finishing up a simple user login with Flask and flask-Bcrypt. However, when trying to login with a user that is stored in my database, I keep getting this error

<
11条回答
  •  梦谈多话
    2020-12-29 08:41

    I had a similar problem - got an: ValueError: Invalid salt - it turned out that in my models I had too few characters in my column:

    password = Column(String(20))
    

    In my database and models I had to change it to:

    password = Column(String(100))
    

    and it worked.

提交回复
热议问题