Email Account Verification In Node JS & React JS | MERN Stack Project

Поділитися
Вставка
  • Опубліковано 17 гру 2024

КОМЕНТАРІ •

  • @maxralph01
    @maxralph01 Рік тому +2

    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 !

  • @shadullahsad9700
    @shadullahsad9700 2 місяці тому

    Thanks a bunch.. solved all the errors.. and works perfectly now.. thank you thank you

  • @MMAGO1
    @MMAGO1 2 роки тому +1

    King CyberWolf!

  • @kalashvasaniya1
    @kalashvasaniya1 Рік тому +1

    Bro you are GOD no one can explain this process that simply!

    • @TECHWITHNIZER
      @TECHWITHNIZER 7 місяців тому

      do not compare God broo even if am a sinner

  • @JohnDismar
    @JohnDismar Рік тому

    Great Job CyberWolves, it is working well! Thank you so much for your tutorial ❤

    • @Justvics
      @Justvics Рік тому

      how, mine isn't working

    • @grenstack
      @grenstack Рік тому

      mine isnt working

  • @santoshbhat-lo6rz
    @santoshbhat-lo6rz Рік тому

    Amazing tutorial.Given source code is helpfull

  • @1cppython
    @1cppython Рік тому

    good job ..great explanation

  • @somyagupta7471
    @somyagupta7471 Рік тому

    Wow this video is very helpful for me... Thankyou so much ❤❤

  • @MultiTrickster121
    @MultiTrickster121 Рік тому

    Thanks, super helpful! Here's a like :)

  • @rockbelleh6237
    @rockbelleh6237 2 роки тому

    Indeed this is a great work.I appreciate u alot sir.tnks and God bless

  • @janine8413
    @janine8413 Рік тому

    you are amazing ❤

  • @greythirdeye1714
    @greythirdeye1714 2 роки тому +2

    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 #🙏

    • @riteshgsh
      @riteshgsh 2 роки тому

      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

  • @usmanshahid8529
    @usmanshahid8529 2 роки тому +3

    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 ❤️

    • @Ytrajpoot
      @Ytrajpoot 2 роки тому

      but by this method you have more controll on verification

    • @usmanshahid8529
      @usmanshahid8529 2 роки тому +1

      @@Ytrajpoot its more efficient way to handle code because by this you can expire it ,but in mongodb it hard ....

    • @Ytrajpoot
      @Ytrajpoot 2 роки тому

      @@usmanshahid8529 sure

  • @devfanor3536
    @devfanor3536 3 роки тому +3

    Que grande eres!!!

  • @mikha2880
    @mikha2880 2 роки тому

    whoaa thankyou sir!

  • @rozumyratatamuradow8565
    @rozumyratatamuradow8565 2 роки тому

    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

  • @ibrahimirwin6568
    @ibrahimirwin6568 2 роки тому

    I need your reply sir,
    why when I run my code (npm start (in client folder)) why won't the form show up?

  • @Djoako22
    @Djoako22 2 роки тому

    Thank you!❤

  • @lukasmacku2423
    @lukasmacku2423 Рік тому

    Hello :), Do you know how to make the expireDate in PRISMA orm???

  • @frenkie1281
    @frenkie1281 Рік тому +1

    I’m not receiving any email I followed this completely. Am I doing something wrong?

  • @trpmusicvideocreator6103
    @trpmusicvideocreator6103 2 роки тому

    Awesome 🙏🙏

  • @saurabhband2354
    @saurabhband2354 2 роки тому +1

    Thank U 💕

  • @raphaelandrade5281
    @raphaelandrade5281 2 роки тому

    Next time do a video without music. Thank you for the video

  • @Motivation-w7r
    @Motivation-w7r 11 місяців тому

    Not any mail come why after Register ?

  • @saurabhpandey6318
    @saurabhpandey6318 Рік тому

    Can any solve iisu getting verify and instant getting 404 error and not verified email

  • @ruthvijrane8647
    @ruthvijrane8647 5 місяців тому

    Can anyone help me for deployment of these code
    I am using vercel but bot able to deploy it

  • @usamaay7907
    @usamaay7907 2 роки тому +1

    after getting email and clicking on it, 404 page not found error occurs, Please help me

  • @milgraph115
    @milgraph115 Рік тому

    can I use this for production?

  • @alicjajot7577
    @alicjajot7577 Рік тому

    'await token.remove()' in routes/users causes the token to be removed and a '404 not found' page error.

    • @WebDev-wi3ui
      @WebDev-wi3ui 8 місяців тому

      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

  • @marioskaldellis3669
    @marioskaldellis3669 Рік тому

    Everything works fine, but when i try to signup second user, i cannot. When i press to the verification link it says not found.

    • @destamy
      @destamy 11 місяців тому

      Yeah me too.. the system says internal server error lol 😂

  • @quanduong3390
    @quanduong3390 Рік тому

    thank you so much

  • @wisdomelue
    @wisdomelue 2 роки тому

    what is being used to redirect the user to your custom page?

  • @saurabhpandey6318
    @saurabhpandey6318 Рік тому

    its not working correctly
    email link are not open router to varify email
    can anyone please check out...

  • @Dip-d9l
    @Dip-d9l Рік тому

    Bro please help me. How to get JWTPRIVARKEY

  • @abelalejandroacunacoronado4549
    @abelalejandroacunacoronado4549 2 роки тому

    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

    • @kailashbhujel7777
      @kailashbhujel7777 2 роки тому +1

      same thing happening to me

    • @usamaay7907
      @usamaay7907 2 роки тому

      @@kailashbhujel7777 hey do you found the error

    • @kailashbhujel7777
      @kailashbhujel7777 2 роки тому

      @@usamaay7907 yes I had a problem with my route path function

  • @tesourodosceus
    @tesourodosceus 2 роки тому

    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.

    • @CyberW0lves
      @CyberW0lves  2 роки тому +1

      Thank you, console log error see what is the error in command prompt.

    • @MMAGO1
      @MMAGO1 2 роки тому

      I had the same error, but It was my own fault. I had a semicolon at the end of my mongodb connection string..

    • @UrduPoetry-vd1mc
      @UrduPoetry-vd1mc Рік тому

      user curly braces after each if statement like (!user){res.status(409).send()} this way and your code will work perfectly!

  • @pranaykharabe7137
    @pranaykharabe7137 2 роки тому +1

    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 ❤!

    • @mudassarali7462
      @mudassarali7462 2 роки тому

      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.

    • @alicjajot7577
      @alicjajot7577 Рік тому

      ​@@mudassarali7462Hi! Do you know how to solve it? I have the same problem with error 404

  • @fahadkazmi5115
    @fahadkazmi5115 2 роки тому

    kindly tell how to connect mongodb compass with this system please tell the procedure

    • @CyberW0lves
      @CyberW0lves  2 роки тому

      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. :)

  • @Motivational_talks
    @Motivational_talks 8 місяців тому

    so is this is valid for all the email

  • @nikhilab337
    @nikhilab337 2 роки тому

    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

    • @zureka3242
      @zureka3242 2 роки тому

      Hi, just change the validUrl to true by default in EmailVerify and you are good to go!!

    • @piyushapatil670
      @piyushapatil670 2 роки тому

      @@zureka3242 didnt work for me

    • @Chris-ti1ll
      @Chris-ti1ll 2 роки тому +1

      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});

    • @pranaykharabe7137
      @pranaykharabe7137 2 роки тому

      @@Chris-ti1ll it's not *wait* , it's *await User.updateOne({ _id: user._id, verified: true });*

    • @usamaay7907
      @usamaay7907 2 роки тому

      hey do you found the solution?

  • @kailashbhujel7777
    @kailashbhujel7777 2 роки тому

    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.

    • @Ytrajpoot
      @Ytrajpoot 2 роки тому

      something wrong in your route path function

    • @kimmotech
      @kimmotech Рік тому

      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

    • @muhammedjaseem3882
      @muhammedjaseem3882 11 місяців тому

      @@kimmotech Hi can you share your github code repo link.I am having same trouble

  • @SRINIJADESHPEDDI
    @SRINIJADESHPEDDI 17 днів тому

    how to run this

  • @ismahenabdallah2188
    @ismahenabdallah2188 2 роки тому

    good night , i followed all the steps , but i can register without verifying with email
    and verified:true not matche help me please

    • @Ytrajpoot
      @Ytrajpoot 2 роки тому

      you check it by if condition if(verified){}

  • @MohamedAli-vf3vy
    @MohamedAli-vf3vy Рік тому

    I dont know what file to run
    HELP!

  • @jomariosacia9907
    @jomariosacia9907 Рік тому

    It said token.remove() is not a function

  • @tiffanyg7068
    @tiffanyg7068 2 роки тому

    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??

    • @Ytrajpoot
      @Ytrajpoot 2 роки тому

      try cors middleware

    • @muhammedjaseem3882
      @muhammedjaseem3882 11 місяців тому

      hey did you solve this problem.Canyou share the gihub repo link

    • @muhammedjaseem3882
      @muhammedjaseem3882 11 місяців тому +1

      ​@@Ytrajpoot can you share your github repo link.so i can compare solve this issue

  • @jason9468
    @jason9468 2 роки тому

    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?

    • @rockbelleh6237
      @rockbelleh6237 2 роки тому

      Nice question still waiting for this response

    • @lunarcdr3083
      @lunarcdr3083 2 роки тому

      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.

    • @jason9468
      @jason9468 2 роки тому

      @@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?

    • @lunarcdr3083
      @lunarcdr3083 2 роки тому

      @@jason9468 Np. In the backend, returning an err as a response to the frontend.

    • @muhammedjaseem3882
      @muhammedjaseem3882 11 місяців тому

      @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

  • @ARNABPRATIHAR-df4tw
    @ARNABPRATIHAR-df4tw Місяць тому

    Email verification process is so easy but background music so problematic🤔🤔

  • @rkvbuzz9244
    @rkvbuzz9244 2 роки тому

    Bro
    How to deploy pls make a video🙏

  • @tainkhantaibkhan1336
    @tainkhantaibkhan1336 9 місяців тому

    Missing .env file

  • @ikhlasaralbaev
    @ikhlasaralbaev 2 роки тому

    super!

  • @moralstories926
    @moralstories926 Місяць тому

    Suggested by Chat GPT. 👍

  • @rashedulalam7754
    @rashedulalam7754 3 роки тому

    Nothing showing

    • @CyberW0lves
      @CyberW0lves  3 роки тому

      What kind of error you are getting on console?

  • @astb01
    @astb01 2 роки тому

    Maybe don’t use background music it can be off putting

  • @localhub3789
    @localhub3789 Рік тому +3

    disliked due to you didn't test it . 2 hours wasted

  • @vishalmyla6276
    @vishalmyla6276 Рік тому +1

    Agar test nahi karte toh vedio mat bana

  • @saurabhpandey6318
    @saurabhpandey6318 Рік тому

    ??

  • @worldbest3097
    @worldbest3097 10 місяців тому

    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" });
    }

    • @worldbest3097
      @worldbest3097 10 місяців тому

      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

  • @md.dilshadulislam9113
    @md.dilshadulislam9113 Рік тому

    bruh,
    why so cringe.. drop the music

  • @ansabali441
    @ansabali441 2 роки тому

    getting error, not sending the email......kindly guide...........
    Invalid login: 535-5.7.8 Username and Password not accepted

    • @CyberW0lves
      @CyberW0lves  2 роки тому +1

      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.

    • @nikhilab337
      @nikhilab337 2 роки тому +1

      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

    • @ansabali441
      @ansabali441 2 роки тому

      @@CyberW0lves thanks brother. I resolve this.

    • @ansabali441
      @ansabali441 2 роки тому

      @@nikhilab337 follow the above steps. Your problem will be resolve

    • @nikhilab337
      @nikhilab337 2 роки тому

      @ansab ali i tried the above steps now still getting 400 (bad request)

  • @CodingWithDilip
    @CodingWithDilip 2 роки тому

    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

    • @CyberW0lves
      @CyberW0lves  2 роки тому +1

      Thank You : )

    • @CodingWithDilip
      @CodingWithDilip 2 роки тому

      @@lalitdhurvey8113 npm start

    • @destamy
      @destamy 11 місяців тому

      @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!

    • @CodingWithDilip
      @CodingWithDilip 11 місяців тому

      @@destamy your welcome 🤗
      and again welcome to our family

  • @mominasim4035
    @mominasim4035 8 місяців тому +3

    I’m not receiving any email I followed this completely. Am I doing something wrong?