🎨 oauth2 update

This commit is contained in:
landaiqing
2024-08-21 22:00:47 +08:00
parent 58ca15768b
commit 78346f6a12
6 changed files with 142 additions and 23 deletions

View File

@@ -202,7 +202,7 @@ func wechatLoginHandler(openId string, clientId string) bool {
return false
}
authUserSocial, err := userSocialService.QueryUserSocialByOpenID(openId, enum.OAuthSourceWechat)
if errors.Is(err, gorm.ErrRecordNotFound) {
if err != nil && errors.Is(err, gorm.ErrRecordNotFound) {
uid := idgen.NextId()
uidStr := strconv.FormatInt(uid, 10)
createUser := model.ScaAuthUser{