Hi, in the register page would not have the first_name and last_name fields ?
yup will fill later in the profile screen
Sorry for the poor information, but i wanted mean in the route "/ register" that create the token to the email confirmation. There are the respective line: const {first_name, last_name, email} = req.body; So the doubt is where are that variables, cause in the form we don't have.
By the way congratilations for these articles, are amazing instructions and ideas for a full stack conception, clear and direct.
I was getting an error when submitting the form, i thought tha was this missing fields but i figured out that my email sender should be verified before in sendGrid platform.
I also noticed that has two diferents JsonWebToken imports, one of the costumized file "./jwt" and another for the entire lib "jsonwebtoken".
And to fix some mongoose warnings i found instructions to add these lines in database configuration
mongoose.set('useNewUrlParser', true); mongoose.set('useFindAndModify', false); mongoose.set('useCreateIndex', true); mongoose.set('useUnifiedTopology', true);
References: https://github.com/sendgrid/sendgrid-nodejs/issues/1088#issuecomment-625917336;
https://mongoosejs.com/docs/deprecations.html#-findandmodify-