feat: update

This commit is contained in:
yanghao05
2025-04-30 14:41:46 +08:00
parent 070bec536b
commit be605ef603
6 changed files with 81 additions and 10 deletions

View File

@@ -72,7 +72,7 @@ func (ctl *auth) Login(ctx fiber.Ctx, code, state, redirect string) error {
Scope: token.Scope,
}),
}
user, err := models.Users.GetUserByOpenIDOrCreate(ctx.Context(), token.Openid, userModel)
user, err := models.Users.GetUserByOpenIDOrCreate(ctx.Context(), token.GetOpenID(), userModel)
if err != nil {
return errors.Wrap(err, "failed to get user by openid")
}