Using Hashed Passwords For Registration - Flask Fridays #14

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

КОМЕНТАРІ • 39

  • @Codemycom
    @Codemycom  3 роки тому +1

    ▶️ Watch Entire Flask Friday Playlist ✅ Subscribe To My UA-cam Channel:
    bit.ly/3ig2eJn bit.ly/2IGzvOR
    ▶️ See More At: ✅ Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt!
    Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN
    ▶️ Get The Code
    bit.ly/2L1jBl5

    • @prachijoshi1667
      @prachijoshi1667 6 місяців тому

      Thank you sir thank you so much❤❤❤ 😇😇😇😇

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

    I think this playlist is the best playlist
    Ever

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

    You are a great teacher. Best 27$ Ive ever spent!

  • @HolyR6.
    @HolyR6. Рік тому

    your pronunciation of werkzeug is really good!! its very close to the actual german pronunciation :)

  • @charchitdahiya986
    @charchitdahiya986 3 роки тому +1

    Was looking for this only and this popped up. Thanks a lot.

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

    Hi John. I really enjoy your tutorials, but I can't understand why you used generate_password_hash on the same password twice (first in "class User" then in "add_user" function). Wouldn't it be enough just to hash it in add_user function and then send it to the database?

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

      You can just assign it to the password attribute of your User() object and it will make use of the property decorator you made in the previous video to hash it. He probably did it like this just in case people didnt see the previous video.

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

      Indeed :
      user = User(name=form.name.data, email=form.email.data)
      user.password = form.password_hash.data
      suffices...
      Explanation :
      user = User(name=form.name.data, email=form.email.data,password=form.paswword_hash.data)
      Does NOT rely on @password.setter, so the password is just passed as is, whereas the first method does.

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

    Necro-ing your video comments, but would be cool if you could provide some advice on how to use a more computational expensive hashing algo, sha-256 is a bit quick!

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

      I remember seeing a Corey Schafer video where he went through one that would increase in computational difficulty after every incorrect password attempt. I forget the video but it is in his Flask series. It's a few years old though.

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

    Muchas gracias John, siempre logro desenredar mis enredos ya vamos por el video 14 y no se cuantos errores e cometido pero siempre logro terminar los videos de manera exitosa a veces tengo que usar otros comandos no entiendo muy bien por que, ejemplo flask --app hello --debug run / flask --app hello db migrate -m no he podido hacer los comentarios pero ahí vamos....Thank you teacher sending you good vibes.... here practice your spanish hahahah

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

    If you get a jinja2 UndefinedError please check the database mosel Users =>password_hash column should match what is taken as argument in password and verify_password function

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

    man a please answer how to use adsense with a django app

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

      huh? Adsense gives you html code...just paste it on any page of the site you want.

  • @204prachijoshi
    @204prachijoshi 6 місяців тому

    hello were to find the source code

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

    can you make video on how to make todo app using flask

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

      Sure, but I have videos on flask crud already...

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

      @@Codemycom Can we get touch in Gmail?

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

      @@samkth1 There's a contact form on codemy.com but you're talking to me here now

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

    Nice!

  • @aaryansachdeva
    @aaryansachdeva 3 роки тому +1

    cool

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

    hi john elder

  • @evansmith87
    @evansmith87 2 роки тому +4

    Everything was going well up to and including lesson #13 (completed last night). Today, before starting lesson #14, I started flask, and when trying to load 'localhost:5000/user/add', I get the below error message, and I have no idea how to fix the problem. :( EDIT: Never mind. I still pressed ahead with this video, and the problem was solved after watching the first 3 minutes of this video. I just need to push the migration into the database. I will leave this message here, in case some future learner has the same problem.
    sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1054, "Unknown column 'users.password_hash' in 'field list'")
    [SQL: SELECT users.id AS users_id, users.name AS users_name, users.email AS users_email, users.favorite_color AS users_favorite_color, users.date_added AS users_date_added, users.password_hash AS users_password_hash
    FROM users ORDER BY users.date_added]
    (Background on this error at: sqlalche.me/e/14/e3q8)

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

      Ha, yeah I was about to suggest that...