比较密码出错

学习课程《G01 Go 实战:Web 入门》10.9节,用户密码加密。
在登录页,输入密码点击“登录”时。
报错: crypto/bcrypt: hashedPassword is not the hash of the given password.

讨论数量: 2

在beforeCreate里面再判断一下是否 hash过了,如果hash过了,就不hash了

1年前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!