Node JS Register and Login API using JWT & MongoDB

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

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

  • @hasanal-sayyed
    @hasanal-sayyed 2 года назад +14

    in case having *.unless is not a function error.
    change the import to this const { unless } = require("express-unless")

    • @bagusirwanto8600
      @bagusirwanto8600 6 месяцев назад

      you can change require to this var { unless } = require("express-unless");

  • @destaonline21
    @destaonline21 3 месяца назад +2

    i never see like you. you are so experienced.

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

    Finally! Waiting for Flutter integration with Provider state management

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

    I have an issue with the last step. When i try authorization by headers with the "TokenKey" a 403 Forbidden error is shown. Please help me

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

      I'm facing same issue can u please tell how u resolved

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

    Thank you for this tutorial. In users.services.js file line number 8 - it's better to add user.password!=null. Maybe you missed it

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

    Fantastic 😊😊 viedo for node js... ☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️☺️

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

    Teşekkürler from Turkey good job

  • @tophub3605
    @tophub3605 2 года назад +2

    Sir i have an error and the error is in index.js
    auth.authenticateTokens.unless({
    path:[
    {url:"/user/login",methods:["POST"]}
    {url:"/user/login",methods:["POST"]}
    ]
    })
    )
    The error is
    auth.authenticateToken.unless is not a function

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

      Me too, help please

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

      const {unless} = require('express-unless');
      The curly brackets are the key!

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

      @@enriccatala8317 Thank you

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

      @@enriccatala8317 thank you, Sir

  • @usmanAli-hw5xu
    @usmanAli-hw5xu 2 года назад +1

    you are best

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

    Hi, Thanks for the Video, the code walk through development approach is good for new learners, if you can share the MVC/ architecture flow / diagram for this code, it may be very helpful to get big picture way of understanding the overall function flow system.

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

    How to add card on stripe using android sdk

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

    can you make the tutorial using Sql instead of mongoose

  • @forsabarça
    @forsabarça Год назад

    npm i -D nodemon ?

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

    Hy..
    whenever i login by sending username and password. I faced JSON Token error...
    {
    "message": "Unexpected token } in JSON at position 55"
    }
    kindly , help me for solving this error.

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

      Have you check the api in Postman or Thunderclient

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

    Is it possible to set the expiresIn for token infinite, meaning it won't expire? If yes can you share how and thank you!

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

    Gracias!!

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

    Nice

  • @forsabarça
    @forsabarça Год назад

    Don't you think that all functions that are related to databases should be async ?

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

      yes all functions are already async, where the issue is ?

    • @forsabarça
      @forsabarça Год назад

      @@SnippetCoder haven't seen any async declaration before a function

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

    Sir , API response show me message that "bcrypt is not defined " what should i do???

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

      var bcrypt = require('bcryptjs');

    • @MohmdMamdouh
      @MohmdMamdouh 11 месяцев назад

      Cannot set properties of undefined (setting ‘unless’)
      Please help

    • @SnippetCoder
      @SnippetCoder  11 месяцев назад

      change the import to this const { unless } = require("express-unless")

    • @MohmdMamdouh
      @MohmdMamdouh 11 месяцев назад

      @@SnippetCoder I did it but problem still continue

  • @AshishSharma-fo1tv
    @AshishSharma-fo1tv 2 года назад

    C:\xampp\htdocs\projects\lost-found
    ode_modules\express\lib
    outer\index.js:513
    this.stack.push(layer);
    ^
    TypeError: Cannot read properties of undefined (reading 'push')
    at Function.route (C:\xampp\htdocs\projects\lost-found
    ode_modules\express\lib
    outer\index.js:513:14)
    please help this issue coming!!!

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

    Cannot set headers after they are sent to the client

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

      Can you please connect me on social media regarding your issue ?

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

      @@SnippetCoder thanks bro I have solved the problame 🙏 thanks for replay

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

      I had the same problem. I solved it updating Node JS to the latest version

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

    TypeError: req.headers is not a function
    help!!

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

    Is there any second part to this video..? If there is please share it in comment section...

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

      ruclips.net/video/czed-wa21IU/видео.html

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

    Hi, I would like to get the source code. I already follow you on the telegram

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

    Hello, when i test register route in postman i get this message "message": "data and salt arguments required", what am i doing wrong

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

      Hello you can verify your code with our repo, get the source code from our GitHub