比较密码出错
学习课程《G01 Go 实战:Web 入门》10.9节,用户密码加密。
在登录页,输入密码点击“登录”时。
报错: crypto/bcrypt: hashedPassword is not the hash of the given password.
在beforeCreate里面再判断一下是否 hash过了,如果hash过了,就不hash了