You always go straight to the point. I always enjoy the blog thing you used to do. You could add it to this as well. Those blogs from the past were really helpful. Amazing !
I have existing reactjs project maam has told to add login in and registration page , sir how should i integrate this so that once i regiater and login than my desktop application would open as homepage ... Please please please help me #🙏
In jwt auth use a Middleware, that checks for a refresh token, if it's present and valid, then show that user's details by simply passing the decoded payload of the jwt refresh token onto the endpoint from the middleware
I have done something like this before ,i saved the token in the redis cache memory and set expiry to 1 hour and then check the link with redis token ..i dont want to save token in mongodb ,it was hard for me to do this because there are few people who is telling about that ,,😊 i will try that way too ❤️
Thank god you saved me I wont forget this Really I'm trying it for past 2 hrs and finally i found your comment await token.remove() just remove this line the code works
Im having problems with verify pages, i dont know how to do flow information. When i click url verify that i get from email how this page conect with my front , i tried but i got 2 things, i got verify but i got a 404 in my screen
Good night. I've done your two tutorials and appeared the error "Internal Server Error" either writing step by step or cloning ... What could it be? Grateful! Congratulations on your work.
Loved your video 😍. But I'm getting 404 error while verifying the email. I checked the network tab so it's showing status code 500. Can you please guide me on this. Thanks for this great tutorial ❤!
it's because of useEffect dependency array. It re-renders component infinite times so when email is verified temp token become empty and we are throwing error from backend.
1) Install mongodb compass 2) In new connnection tab click on connect. it will run on localhost with certain port. 3) add your url mongodb://127.0.0.1:{port} in mongodb.connect method. :)
Hi, I'm getting link to verify email address however when i click on that link it says this site can't be reached and also on console im getting error : post 400 (bad request) .. Kindly help me
There is an error on the server side Path : server/routes/user.js Error is on line 52 : wait User.updateOne({ _id: user._id, verified: true }); Fix it by putting a bracket: await User.updateOne({ _id: user._id}, {verified: true});
Im getting an error with the link..its showing the 404 Not Found Error but when inspecting it, I'm seeing Network Error and Cross-Origin Request Blocked Reason: CORS request did not succeed..any help??
Great tutorial! I have a question regarding the verification link. What is supposed to happen to it once it expires? I set my token model to expire at 30 seconds to test it out, but the link still works after 30 seconds and still redirects the user to the EmailVerify screen. What should be the correct outcome if they click an expired link?
My logic would say to setup a check to see if the link has been used already, if so than return a response with the message that the link is invalid/expired.
@@lunarcdr3083 thanks for the response! Would this logic be set up in the backend, or is it more of a frontend task where I would create a conditional statement checking if the link was previously clicked on?
@jason9468 I am having trouble when user clicks the link.I gives cannot get 123213/verify/567567 - 404. Can youprovide your github repo link so that i can use your code to troubleshoot my code
might be late though, for those who are having some problom with twice api called i mean( email verified and then, 404 not found), 1) first of all, in frontside , delete "param" dependency array in useeffect 2) and, in backend add if (user.verified) { return res .status(200) .send({ message: "Email already verified successfully" }); }
Sorry I forgot to mention. In order to connect Gmail account with nodemailer. You need to turn off 2 step verification and turn on allow less secure apps.
Even I was getting same error i did what u said later i ended up with this error *failed to load resource the server responded with a status of 400 (bad request) * kindly help me
got small mistake in your code server/routes/users.js - line 53 error: await User.updateOne({ _id: user._id, verified: true }); fix: await User.updateOne({ _id: user._id }, { verified: true }); thank you for the video
@CodingWithDilip thanks alot bro! You fix it up!! These code didnt working for the 2nd user but after i fix it up following your advice then it works! Auto subsribe your youtube channel!
You always go straight to the point.
I always enjoy the blog thing you used to do. You could add it to this as well.
Those blogs from the past were really helpful.
Amazing !
Thanks a bunch.. solved all the errors.. and works perfectly now.. thank you thank you
King CyberWolf!
Bro you are GOD no one can explain this process that simply!
do not compare God broo even if am a sinner
Great Job CyberWolves, it is working well! Thank you so much for your tutorial ❤
how, mine isn't working
mine isnt working
Amazing tutorial.Given source code is helpfull
good job ..great explanation
Wow this video is very helpful for me... Thankyou so much ❤❤
Thanks, super helpful! Here's a like :)
Indeed this is a great work.I appreciate u alot sir.tnks and God bless
you are amazing ❤
I have existing reactjs project maam has told to add login in and registration page , sir how should i integrate this so that once i regiater and login than my desktop application would open as homepage ...
Please please please help me #🙏
In jwt auth use a Middleware, that checks for a refresh token, if it's present and valid, then show that user's details by simply passing the decoded payload of the jwt refresh token onto the endpoint from the middleware
I have done something like this before ,i saved the token in the redis cache memory and set expiry to 1 hour and then check the link with redis token ..i dont want to save token in mongodb ,it was hard for me to do this because there are few people who is telling about that ,,😊 i will try that way too ❤️
but by this method you have more controll on verification
@@Ytrajpoot its more efficient way to handle code because by this you can expire it ,but in mongodb it hard ....
@@usmanshahid8529 sure
Que grande eres!!!
whoaa thankyou sir!
Why do you cannot save token in hash? When I do this I send verify link your created token but save it create with hash
I need your reply sir,
why when I run my code (npm start (in client folder)) why won't the form show up?
Thank you!❤
Hello :), Do you know how to make the expireDate in PRISMA orm???
I’m not receiving any email I followed this completely. Am I doing something wrong?
same
Awesome 🙏🙏
Thank U 💕
Next time do a video without music. Thank you for the video
Not any mail come why after Register ?
Can any solve iisu getting verify and instant getting 404 error and not verified email
Can anyone help me for deployment of these code
I am using vercel but bot able to deploy it
after getting email and clicking on it, 404 page not found error occurs, Please help me
I get the same error
@@kimmotechsend me the repo
can I use this for production?
'await token.remove()' in routes/users causes the token to be removed and a '404 not found' page error.
Thank god you saved me
I wont forget this
Really I'm trying it for past 2 hrs and finally i found your comment
await token.remove()
just remove this line the code works
Everything works fine, but when i try to signup second user, i cannot. When i press to the verification link it says not found.
Yeah me too.. the system says internal server error lol 😂
thank you so much
what is being used to redirect the user to your custom page?
useNavigation hook
its not working correctly
email link are not open router to varify email
can anyone please check out...
Bro please help me. How to get JWTPRIVARKEY
Im having problems with verify pages, i dont know how to do flow information. When i click url verify that i get from email how this page conect with my front , i tried but i got 2 things, i got verify but i got a 404 in my screen
same thing happening to me
@@kailashbhujel7777 hey do you found the error
@@usamaay7907 yes I had a problem with my route path function
Good night. I've done your two tutorials and appeared the error "Internal Server Error" either writing step by step or cloning ... What could it be? Grateful! Congratulations on your work.
Thank you, console log error see what is the error in command prompt.
I had the same error, but It was my own fault. I had a semicolon at the end of my mongodb connection string..
user curly braces after each if statement like (!user){res.status(409).send()} this way and your code will work perfectly!
Loved your video 😍. But I'm getting 404 error while verifying the email. I checked the network tab so it's showing status code 500.
Can you please guide me on this.
Thanks for this great tutorial ❤!
it's because of useEffect dependency array. It re-renders component infinite times so when email is verified temp token become empty and we are throwing error from backend.
@@mudassarali7462Hi! Do you know how to solve it? I have the same problem with error 404
kindly tell how to connect mongodb compass with this system please tell the procedure
1) Install mongodb compass
2) In new connnection tab click on connect. it will run on localhost with certain port.
3) add your url mongodb://127.0.0.1:{port} in mongodb.connect method. :)
so is this is valid for all the email
Hi, I'm getting link to verify email address however when i click on that link it says this site can't be reached and also on console im getting error : post 400 (bad request) .. Kindly help me
Hi, just change the validUrl to true by default in EmailVerify and you are good to go!!
@@zureka3242 didnt work for me
There is an error on the server side
Path : server/routes/user.js
Error is on line 52 :
wait User.updateOne({ _id: user._id, verified: true });
Fix it by putting a bracket:
await User.updateOne({ _id: user._id}, {verified: true});
@@Chris-ti1ll it's not *wait* , it's *await User.updateOne({ _id: user._id, verified: true });*
hey do you found the solution?
I'm having problems with verifying pages. I tried but I got 2 things, I got verified but immediately I got a error '404 not found' on my screen.
something wrong in your route path function
I solved this by
Replacing:
const verifyToken = await new VerificationToken({
userId: user._id,
token: crypto.randomBytes(32).toString('hex'),
}).save();
const url = `${process.env.BASE_URL}/${user._id}/verify/${verifyToken.token}`;
With:
const verifyToken = await new VerificationToken({
userId: user._id,
token: crypto.randomBytes(32).toString('hex'),
}).save();
const url = `${process.env.BASE_URL}/${verifyToken.userId}/verify/${verifyToken.token}`;
In the url
@@kimmotech Hi can you share your github code repo link.I am having same trouble
how to run this
good night , i followed all the steps , but i can register without verifying with email
and verified:true not matche help me please
you check it by if condition if(verified){}
I dont know what file to run
HELP!
It said token.remove() is not a function
Im getting an error with the link..its showing the 404 Not Found Error but when inspecting it, I'm seeing Network Error and Cross-Origin Request Blocked
Reason: CORS request did not succeed..any help??
try cors middleware
hey did you solve this problem.Canyou share the gihub repo link
@@Ytrajpoot can you share your github repo link.so i can compare solve this issue
Great tutorial! I have a question regarding the verification link. What is supposed to happen to it once it expires? I set my token model to expire at 30 seconds to test it out, but the link still works after 30 seconds and still redirects the user to the EmailVerify screen. What should be the correct outcome if they click an expired link?
Nice question still waiting for this response
My logic would say to setup a check to see if the link has been used already, if so than return a response with the message that the link is invalid/expired.
@@lunarcdr3083 thanks for the response! Would this logic be set up in the backend, or is it more of a frontend task where I would create a conditional statement checking if the link was previously clicked on?
@@jason9468 Np. In the backend, returning an err as a response to the frontend.
@jason9468 I am having trouble when user clicks the link.I gives cannot get 123213/verify/567567 - 404. Can youprovide your github repo link so that i can use your code to troubleshoot my code
Email verification process is so easy but background music so problematic🤔🤔
Bro
How to deploy pls make a video🙏
Missing .env file
super!
Suggested by Chat GPT. 👍
Nothing showing
What kind of error you are getting on console?
Maybe don’t use background music it can be off putting
disliked due to you didn't test it . 2 hours wasted
Agar test nahi karte toh vedio mat bana
??
might be late though, for those who are having some problom with twice api called i mean( email verified and then, 404 not found),
1) first of all, in frontside , delete "param" dependency array in useeffect 2) and, in backend add if (user.verified) {
return res
.status(200)
.send({ message: "Email already verified successfully" });
}
if dont want to delete param, then just do 2) option. 404 not found shown because already token is deleted even though user is verified
bruh,
why so cringe.. drop the music
getting error, not sending the email......kindly guide...........
Invalid login: 535-5.7.8 Username and Password not accepted
Sorry I forgot to mention. In order to connect Gmail account with nodemailer. You need to turn off 2 step verification and turn on allow less secure apps.
Even I was getting same error i did what u said later i ended up with this error *failed to load resource the server responded with a status of 400 (bad request) * kindly help me
@@CyberW0lves thanks brother. I resolve this.
@@nikhilab337 follow the above steps. Your problem will be resolve
@ansab ali i tried the above steps now still getting 400 (bad request)
got small mistake in your code
server/routes/users.js - line 53
error: await User.updateOne({ _id: user._id, verified: true });
fix: await User.updateOne({ _id: user._id }, { verified: true });
thank you for the video
Thank You : )
@@lalitdhurvey8113 npm start
@CodingWithDilip thanks alot bro! You fix it up!! These code didnt working for the 2nd user but after i fix it up following your advice then it works! Auto subsribe your youtube channel!
@@destamy your welcome 🤗
and again welcome to our family
I’m not receiving any email I followed this completely. Am I doing something wrong?