Nodejs MYSQL Login Tutorial - Register User - Part 6/7

Поделиться
HTML-код
  • Опубликовано: 31 янв 2025

Комментарии • 182

  • @vinaygoswami5374
    @vinaygoswami5374 3 года назад +38

    where is the part 7 please this was so helpful

  • @anaispascale
    @anaispascale 2 года назад +1

    This is the very first comment i leave on a video since i started learning code: THANK YOU! The word is not great enough to express how much i am grateful! thanks you you video i understood a bunch of things that were hazy 'til now (MVC model, bscript and hashing, etc...). you are an amazing teacher, your explanations are so clear, it's easy to follow and understand whatever you do. thank you so much!

  • @KV_AlwarArun_Singh
    @KV_AlwarArun_Singh 8 месяцев назад +1

    I have no word to thank you for guiding me through this series

  • @thewavyblue
    @thewavyblue 9 месяцев назад +9

    Dear future viewer,
    If, like me, you reached the end of this playlist expecting to see part 7: tough luck.
    At no point during the series were we told that this last part is only available to those who buy the course from Telmo's website. That's a shame, but as monthly access to Telmo's entire library of content is only $9.99 p/m, I'd suggest you head on over and just cough up what you have arguably already consumed in the form of value from this video series. 🤷‍♂️
    I hope that clarifies your confusion and averts any disappointment.
    Guy's gotta make a living somehow, I guess! 😅

  • @sabinomerciales2742
    @sabinomerciales2742 3 года назад +13

    Hi Telmo, Thank you for this video, may i know where is the part 7 of this video. Thanks!

  • @matthiascelis
    @matthiascelis 3 года назад +4

    Started watching this serie , went back to each one of them to thumbs up!

  • @ShravanDwarka
    @ShravanDwarka 3 месяца назад

    Hello Telmo.. you're the best channel giving tips and all! Please re-upload part 7 (if it was removed or something..) you left all of us on a cliffhanger 😅😅

  • @xprmntt
    @xprmntt 3 года назад +8

    For anyone that is getting issues with the results.lenght check. That is because the results array contains RowDataPackets. In the query you can add var resultArray = Object.values(JSON.parse(JSON.stringify(results))) and after that in the result.lenght change it with if(resultArray.lenght > 0). That fixed it for me.

  • @jrmsrs
    @jrmsrs 9 месяцев назад +1

    Sei que não é o foco, mas pra economizar o consumo do banco chequem se as senhas conferem antes de verificar se o email existe, ou melhor, antes de realizar o POST pro backend, as paginas dinâmicas modernas costumam dar esse feedback enquanto está digitando porque é útil até em questão de usabilidade.

    • @jrmsrs
      @jrmsrs 9 месяцев назад

      De qualquer forma, não confiem em validação no lado cliente, só para coisas muito básicas como essa, e as vezes é importante até ser redundante, é bom, e.g., um usuário comum saber enquanto digita que ele não pode inserir caracteres indesejados, mas usuários mais espertos podem inserir de outra forma, lugar de lógica é no backend.

  • @SelssabilaKIOUAZ
    @SelssabilaKIOUAZ Год назад

    you go straight to the point with a very clear explanation with what's going underthe hood thank you so much sir

  • @abdulrehmanalibrohi221
    @abdulrehmanalibrohi221 Год назад +1

    Hi Telmo, you teaching method is really great plz need the 7th video

  • @earthlygamer7142
    @earthlygamer7142 2 года назад

    Lots of respect for you Allah bless you I was stucked for three days and was feeling headache but know I am relax sir plz make backend on payment system plz sir lots of people are searching for it

  • @UdayKumar-gh6vv
    @UdayKumar-gh6vv 2 года назад +2

    Hi , Telmo please upload the part 7 also . These series are very helpful .

  • @Martin958
    @Martin958 3 года назад +4

    Is Part 7 only available after paying for the full course?

    • @MG-nn8dy
      @MG-nn8dy 2 года назад +3

      yeah... not up front enough about this fact...

  • @hanineserhan9857
    @hanineserhan9857 3 года назад +20

    great work!!, part 7 please!!

    • @jaguirre9176
      @jaguirre9176 3 года назад +2

      You have to buy the course to get part seven... 😐

    • @jaguirre9176
      @jaguirre9176 3 года назад +4

      @@byleo2861 nope

    • @yusufyuksel1197
      @yusufyuksel1197 2 года назад +6

      @@jaguirre9176 yakışmadı!!!

    • @carldrogo9492
      @carldrogo9492 Год назад

      The guy who made this tutorial is a clown.

  • @anupampammi1735
    @anupampammi1735 2 года назад +6

    Hi Telmo, this series is absolutely amazing, I have understood the various other features in this tutorial series. Among the other RUclipsrs you are very clear and specific in explanation with live outputs on the screen without any behind the screen modifications. Could you please update the part 7 in this series, because as of the the user is being registered and I am curious to develop the login integration of the user into the homepage. Could you please update us with the upload date of this 7th part. New sub here !! Thanks !!

  • @coyotearbjj4949
    @coyotearbjj4949 2 года назад +4

    This series is amazing, thank you so much! I learned a lot from it and the way you explain is the clearest. Please could you reupload part 7 so the series of the auth with jwt is complete? Thanks in advance, new sub here!

  • @urbn-code
    @urbn-code 3 года назад +3

    11:06 - I think instead of just 'results' we should use 'results.length'... If I am entering an email ID not present in my database... then the app is crashing... results is yielding an empty array... which is not a NULL value... so yeah... by using length function we could check if the array is empty or not... please correct me if I'm wrong...

    • @krithik9961
      @krithik9961 6 дней назад

      Use results?.length to avoid crash

  • @MohitJakhotra
    @MohitJakhotra 3 года назад +2

    best series !! but where is the 7th part ?

  • @hasanurrahman2621
    @hasanurrahman2621 3 года назад

    Thank u so much. On these tutorials I have been soaking all the information you have covered!

  • @pradyumnagayake4825
    @pradyumnagayake4825 3 года назад +1

    Thank you very much sir !! This video series is best series for node js

  • @usmanpervaiz6122
    @usmanpervaiz6122 4 года назад +4

    Cannot read property 'length' of undefined
    anyone help please .. getting this error

    • @guillemsantamaria1654
      @guillemsantamaria1654 3 года назад

      did you find the error?

    • @tweealpha6558
      @tweealpha6558 3 года назад

      check the spelling of length I'm sure that's the problem bcoz for some reason it autocorrect to 'lenght'

  • @HunterShaw
    @HunterShaw 4 года назад +4

    I'm running into an error at minute 23:00.
    "Error: data and salt arguments required
    at Object.hash". I'm assuming we need a salt argument for the .hash() before it will work.
    Any ideas? Great video, just stuck because it seems to be deprecated.

    • @pauloroberto-gz4kv
      @pauloroberto-gz4kv 11 месяцев назад

      Precisar manda um oi, que explico!

    • @pauloroberto-gz4kv
      @pauloroberto-gz4kv 11 месяцев назад

      const bcrypt = require('bcrypt')
      // codificando a senha
      const salt = 12
      const getSalt = bcrypt.genSaltSync(salt)
      const senhaHash = bcrypt.hashSync(senha, getSalt)

  • @ainiarahman1621
    @ainiarahman1621 3 года назад +2

    why i can't find part 7? please help me

  • @eduardopraciano4143
    @eduardopraciano4143 3 месяца назад

    desistiu de gravar a parte 7 @Telmo?

  • @shaikhmohdnoman5340
    @shaikhmohdnoman5340 3 года назад +3

    Where is the 7th part of this series

    • @suriyam5740
      @suriyam5740 3 года назад +1

      ruclips.net/video/OEN5L_lAY8A/видео.html

  • @starbuck224
    @starbuck224 3 года назад +5

    Is there a part 7 of 7 yet? I only see 6 of 7..

    • @suriyam5740
      @suriyam5740 3 года назад +4

      ruclips.net/video/OEN5L_lAY8A/видео.html

    • @jjjc5787
      @jjjc5787 3 года назад +1

      @@suriyam5740 life saviour appreciate it thank you :D

    • @hanineserhan9857
      @hanineserhan9857 3 года назад +1

      @@suriyam5740 video unavailable? I can't access this video

    • @mutaz549
      @mutaz549 3 года назад

      @@suriyam5740 video is private

    • @suriyam5740
      @suriyam5740 3 года назад

      @@mutaz549 author would have locked it

  • @nourali27
    @nourali27 3 года назад

    Things I learned so far. Bootstrap, Json, Express and Node Js cool cool

  • @chrisrosales7596
    @chrisrosales7596 2 года назад +1

    I hope the part 7 will be released here

  • @troymitchel4790
    @troymitchel4790 4 года назад +4

    Hey Telmo, great series. Just wondering, when did you add in the routes, controlers, auth.js, and pages.js?

    • @Telmosampaio
      @Telmosampaio  4 года назад +1

      Hi Troy, I'm really sorry about that, I really missed the video 5 after the 4, I'm uploading it right now, the full course will be available at telmoacademy.com, and you can use the code nodejs20 for 20% discount

    • @aleempasha4098
      @aleempasha4098 3 года назад

      can you please send me the code or project file please brother..

  • @quickpodcast5minutecasts
    @quickpodcast5minutecasts 3 года назад +1

    For everyone who asks where is 7 he have the course payed this is probably a free introduction

  • @mohamed_v1
    @mohamed_v1 4 года назад +3

    i got this error "await is only valid in async function" when i call await bcrypt .hashh

    • @mohamed_v1
      @mohamed_v1 4 года назад +5

      I change it to bcrypt.hashSync and its work without await

    • @lesterjohnvista1161
      @lesterjohnvista1161 4 года назад

      Yow thank you.

    • @MusabbirMamun
      @MusabbirMamun 4 года назад

      @@mohamed_v1 Thanks man. It works.

    • @mmlw2089
      @mmlw2089 4 года назад

      Thank a lot it work!

  • @ShaguftaSherazi-u9s
    @ShaguftaSherazi-u9s Год назад

    Hello sir, your this series is very informative. i really need 7 part of videos. please share it to me i really need it. i am beginner and i will pay you when i started earning.....

  • @geofmira9644
    @geofmira9644 Год назад

    Thanks sir, when will you add the last part, 7/7??

  • @nurdinhadipratama8735
    @nurdinhadipratama8735 Год назад

    Very helpful, please drop next part

  • @Parendinate
    @Parendinate 3 месяца назад

    Thanks man but where is the part 7 :(

  • @kesagaurav8100
    @kesagaurav8100 4 года назад +1

    hi the results. length is not working can you give me the answer plz

  • @amrmanasterly508
    @amrmanasterly508 4 года назад

    You are amazing person, keep it up bro!

    • @vishaljais3467
      @vishaljais3467 3 года назад +2

      where is the last video :{ 7th one

  • @puripujitha5452
    @puripujitha5452 Год назад

    this play list is very good but the actual part is missing . i just came here to learn about cookies but 7th part is still not uploaded. anyways ur explanation is very gud and u r explaining from very basics , thanks for that..

  • @navjotsandhu3670
    @navjotsandhu3670 2 года назад

    We are desperately waiting for the last part of the series.

  • @paulapetcu894
    @paulapetcu894 3 года назад +1

    Hello. I have this error : ER_NO_DB_ERROR: No database selected does anyone know how to solve it?

    • @mohamedyasser6299
      @mohamedyasser6299 3 года назад +1

      you just take the dot env and dot env cofig and path and public directory from app js and copy it to auth then it will work fine

  • @rohithamlpur
    @rohithamlpur 5 месяцев назад

    hi Telmo ,
    please share link of next video

  • @goncalo05
    @goncalo05 2 года назад

    There's one problem here, the fact that after render the url keeps the POST url and the user can make f5 and this tries to submit it again. How to fix it?

  • @Kalvertquarwerzig
    @Kalvertquarwerzig 10 месяцев назад

    why hashed passwords on register and on login are different even String values are same ?
    what is the solution to hash them with same values
    please help

  • @sandeeppatil-vb6nn
    @sandeeppatil-vb6nn 2 года назад

    Where is 7 part of this course?

  • @ILuvThe13ible
    @ILuvThe13ible 9 месяцев назад

    what happened wit part 7? please help to find it !

  • @shadow_hack8667
    @shadow_hack8667 9 месяцев назад

    please where is the 7 part?? it can be help please

  • @TaukirAhmad-m9r
    @TaukirAhmad-m9r 11 месяцев назад

    Where i can find the part 7/7 please do help

  • @MarkusRepository-f1p
    @MarkusRepository-f1p Год назад

    thank you! best example! greetings from Ukraine!

  • @dinu6616
    @dinu6616 10 месяцев назад

    Hi! The message for the passwords do not match doesn work for me, any help?

  • @mirfayzkarimoff2148
    @mirfayzkarimoff2148 2 года назад

    Where is the Part 7 of the video???

  • @nezinaunezinau3119
    @nezinaunezinau3119 Год назад

    As soon as I click register, all the css dissapears. Can anyone help me with this problem?

  • @zaylo9273
    @zaylo9273 4 года назад +2

    for ejs file, how do we pop out error?

  • @obukohwooviemo6253
    @obukohwooviemo6253 2 года назад

    bro you are the best thanks

  • @codebrew420
    @codebrew420 4 года назад +1

    Amazing videos Telmo, I do have the same question as Troy, are we missing the sections for routes.js, ruth.js and the controllers folder. Currently I am unable to return if password is not a match. Again stellar job on these tutorials I have been soaking all the information you have covered!

    • @codebrew420
      @codebrew420 4 года назад

      *auth.js

    • @Telmosampaio
      @Telmosampaio  4 года назад

      Hi Dylan, I hope I didn't forget to upload some part, ahah, I will check it and upload if missing :)

    • @codebrew420
      @codebrew420 4 года назад

      @@Telmosampaio You Rock! Looks like the gap is between tutorial 4 and 5.

    • @Telmosampaio
      @Telmosampaio  4 года назад

      So sorry about that, I'm uploading now the missing video, the rest of the course will be available at telmoacademy.com, and for those of you following from youtube you can use the coupon nodejs20 for 20% off

    • @Telmosampaio
      @Telmosampaio  4 года назад

      Its the video number 5 coming up

  • @ahmadhassan-c9e
    @ahmadhassan-c9e 10 месяцев назад

    where is 7th part?????

  • @jeddmontialto6393
    @jeddmontialto6393 4 месяца назад

    thank you so much!!!

  • @martinn1071
    @martinn1071 3 года назад

    so useful !! thanks so much !!

  • @shutupsanat1270
    @shutupsanat1270 Год назад

    where is video number 7?

  • @n.venumadhav3711
    @n.venumadhav3711 2 года назад +1

    Is there anyone have 7th video of it?

  • @ziggarot
    @ziggarot 4 года назад

    Hi, I got to the point where I am testing to check if the passwords match or not. I thought I had written everything word by word but I am getting an "Error: ER_NO_DB_ERROR: No database selected" error
    in controllers/auth.js I have the following:
    const mysql = require('mysql');
    const jwt = require('jsonwebtoken');
    const bcrypt = require('bcryptjs');
    const db = mysql.createConnection({
    host: process.env.DATABASE_HOST,
    user: process.env.DATABASE_USER,
    password: process.env.DATABASE_PASSWORD,
    databse: process.env.DATABASE,
    });
    exports.register = (req, res) => {
    console.log(req.body);
    const { name, email, password, passwordConfirm } = req.body;
    db.query(
    'SELECT email FROM users WHERE email = ?',
    [email],
    async (error, results) => {
    console.log(results);
    if (error) {
    console.log(error);
    } else if (results.length > 0) {
    return res.render('register', {
    message: 'That email is already registered',
    });
    } else if (password !== passwordConfirm) {
    return res.render('register', {
    message: 'Passwords do not match',
    });
    }
    let hashedPassword = await bcrypt.hash(password, 8);
    console.log(hashedPassword);
    }
    );
    };
    Did I do something wrong in an earlier step?

    • @redtornado1744
      @redtornado1744 4 года назад +1

      we have the same error and unfortunately same mistake, I laughed at it because im looking for it merely for 1 hour, the spelling of "database" is "databse" ...

  • @muztosh3359
    @muztosh3359 2 года назад

    where is rest of videos sir?

  • @AbejaCruz12
    @AbejaCruz12 3 года назад

    i have two error : ER_NO_DB_ERROR: No database selected and TypeError: Cannot read property 'length' of undefined

    • @paulapetcu894
      @paulapetcu894 3 года назад

      did you found what was the problem? for the first error

    • @AbejaCruz12
      @AbejaCruz12 3 года назад

      @@paulapetcu894 Nothing :(

    • @mohamedyasser6299
      @mohamedyasser6299 3 года назад

      you just take the dot env and dot env cofig and path and public directory from app js and copy it to auth then it will work fine

  • @octaviocossa7662
    @octaviocossa7662 4 года назад +1

    Amazing tutor..

  • @webbie_crawls
    @webbie_crawls 3 года назад +1

    SyntaxError: await is only valid in async function

  • @flavienmayet-usalife6417
    @flavienmayet-usalife6417 3 года назад

    Somebody to tell me how i can resolve this probleme "TypeError: Cannot read property 'length' of undefined" ? I found anything. Help me please !!!

  • @v-universe5262
    @v-universe5262 Год назад

    Please where is Part 7

  • @pablovalenzuela4961
    @pablovalenzuela4961 4 года назад

    hello Telmo if i use ejs for the form and i need put this code {{#if message}}
    {{message}}
    {{/if}}
    this code is not working because the form is in ejs if i change and econfigure the page is so bad in the backend

  • @rafaelalima909
    @rafaelalima909 Год назад

    Muito top, pena que ainda falta mais partes

  • @RicardoGarcia-rq5rb
    @RicardoGarcia-rq5rb 3 года назад

    hello, i keep getting an error of : "Access denied for user ''@'localhost' (using password: NO)", from the database. Any idea how to resolve this?

    • @mbfreitas0
      @mbfreitas0 3 года назад

      Ricardo, fix the issue this way in the mysql terminal: ALTER USER 'name_user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';

  • @junwei7744
    @junwei7744 3 года назад

    can you make a video on how to edit the profile user name ?

  • @mcaddit6802
    @mcaddit6802 3 года назад

    how to write the given below code, if i am using PostgreSQL?

  • @mrinalkhera4334
    @mrinalkhera4334 3 года назад

    Videos were awesome dude!!..but after reaching here searching for 7th video (res.render('login'),{message:"NO RESULT FOUND!"}).. 🙁

  • @bukubukuchakama6005
    @bukubukuchakama6005 4 года назад

    It is showing error 24:00
    " Cannot destructure property 'name' of undefined or 'null' "

    • @nitins5923
      @nitins5923 4 года назад

      i am facing same problem.....

    • @ethancrabb404
      @ethancrabb404 4 года назад +1

      Hey, I had this issue as well. Make sure your constant is structured exactly like this:
      const { name, email, password, passwordConfirm } = req.body;

    • @raghavmalhotra4018
      @raghavmalhotra4018 3 года назад

      make sure you have added app.use(express.json()) and app.use(express.urlencoded({extended:false}) in your app.js

  • @danushadhaamarasekera7215
    @danushadhaamarasekera7215 7 месяцев назад

    thank you so much

  • @sumanmajhi6573
    @sumanmajhi6573 4 года назад

    hello sir, everything is fine. how can i stop the 'confirm form resubmission' ??

  • @benzemamumba
    @benzemamumba 2 года назад

    Where's the part 7?

  • @pastormin6650
    @pastormin6650 4 года назад

    Hi Telmo, in the db.query callback function in auth.js file. Instead of (error, results) can I put in (err, data) as parameters? What if I switched the parameters order to (results, errors) will I get an error?

  • @ajaysingh-cr2mp
    @ajaysingh-cr2mp Год назад

    part 7 not Available

  • @aishwaryagaikwad3732
    @aishwaryagaikwad3732 2 года назад

    kindly upload part no 7, rest tutorial is helpful for me

  • @lesterjohnvista1161
    @lesterjohnvista1161 4 года назад

    Syntax error: await is only valid in async function
    What should I do?

    • @Dan_ny
      @Dan_ny 4 года назад +1

      Every time you use the await keyword it has to be inside an async function. So 19:55 just add the keyword async in front of the function.

  • @apnevichar11
    @apnevichar11 Год назад

    need other parts
    to understand the whole scenario

  • @brentvsmaximvsone
    @brentvsmaximvsone 4 года назад

    when I hash the password I it won't connect to the database, the program just hangs up? can anyone suggest anything for that?

  • @lesterjohnvista1161
    @lesterjohnvista1161 4 года назад

    What back end is used here? Thanks

    • @safeershaikh9218
      @safeershaikh9218 4 года назад

      Node.js is used as a backend and we use express.js its a framework of node.js

  • @danielmurilovaz2551
    @danielmurilovaz2551 4 года назад

    Great job!!!

  • @beawy1785
    @beawy1785 3 года назад +1

    part 7 pls

  • @jackie555551
    @jackie555551 2 года назад

    where part 7??

  • @davinascimento9259
    @davinascimento9259 3 года назад +2

    I'm sad! I don't have money for part 7😅

  • @shivasankari2876
    @shivasankari2876 4 года назад

    I lose my styling when the message is displayed. Did anyone face the same problem i faced?

  • @fabiodx2
    @fabiodx2 Год назад

    Kinda shitty that Part 7 is behind the paywall, he should have disclaimed it from the beginning but at least is useful for you to try to do it yourself.

  • @densetsu7690
    @densetsu7690 4 года назад

    i have error : email is not defined
    pls help

  • @suriyam5740
    @suriyam5740 3 года назад

    Brother your tutorial is so Awesome and helpful, Muchas gracias

  • @thulasimani9191
    @thulasimani9191 4 года назад +1

    I'm Also Need pages.js Help me

  • @feldevmoura
    @feldevmoura 2 года назад

    I need the login

  • @mcaddit6802
    @mcaddit6802 3 года назад

    db.query('select email from customer where email=?', [email], async(error, results) => {
    if(error){
    console.log(error);
    }
    if(results.length>0){
    return res.render('register',{
    message: "That email is already in use"
    })
    }
    else if(password !== passwordConfirm){
    return res.render('register', {
    message: 'Passwords don not match'
    });
    }
    let hashedPassword = await bcrypt.hash(password,8);
    console.log(hashedPassword);
    });
    //res.send("Form submitted");
    }

  • @Imjustachillegg
    @Imjustachillegg 5 месяцев назад

    W tutorial

  • @bilalaccounts4140
    @bilalaccounts4140 Год назад

    next part plzzz...?

  • @sømeware-q2m
    @sømeware-q2m 2 года назад

    part 7 plsssssss

  • @akshaya2822
    @akshaya2822 2 года назад

    please upload next part bro

  • @harnaaveducation
    @harnaaveducation 4 года назад

    Error proces code none zero something