diff --git a/pkg/auth/auth0/service.go b/pkg/auth/auth0/service.go index d9539c6ff..bd0f2c13f 100644 --- a/pkg/auth/auth0/service.go +++ b/pkg/auth/auth0/service.go @@ -92,9 +92,23 @@ func (a *Service) GetOrCreateUser(userID, email string) (*User, error) { } if user == nil || user.UserId == "" { + appMetadataJsonb := pgtype.JSONB{} + err = appMetadataJsonb.Set([]byte("")) + if err != nil { + return nil, err + } + + userMetadataJsonb := pgtype.JSONB{} + err = userMetadataJsonb.Set([]byte("")) + if err != nil { + return nil, err + } + user = &db.User{ - Email: email, - UserId: userID, + Email: email, + UserId: userID, + AppMetadata: appMetadataJsonb, + UserMetadata: userMetadataJsonb, } err = a.database.CreateUser(user) if err != nil {