diff --git a/internal/web/auth.go b/internal/web/auth.go index aa8bfff..39d3d28 100644 --- a/internal/web/auth.go +++ b/internal/web/auth.go @@ -235,6 +235,10 @@ func oauthCallback(ctx echo.Context) error { return errorRes(500, "Cannot get user", err) } + if user.NickName == "" { + user.NickName = strings.Split(user.Email, "@")[0] + } + userDB = &db.User{ Username: user.NickName, Email: user.Email,