MERN Authentication Tutorial #3 - Signing Up & Hashing Passwords

MERN Authentication Tutorial #3 - Signing Up & Hashing Passwords

Net Ninja

1 год назад

41,323 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@AyyPeff
@AyyPeff - 01.01.2024 07:05

if you get "error": User.signup is not a function, i had "userSchema.static.signup" when typing static, intellisense might suggest singular "static" but the one used here is "statics".

Ответить
@xx-fw1yq
@xx-fw1yq - 04.10.2023 18:04

Best video I’ve seen yet for this solution. Thanks.

Ответить
@wzup23
@wzup23 - 15.09.2023 10:37

thank you so much!

Ответить
@engkunasya
@engkunasya - 22.07.2023 10:43

[nodemon] app crashed - waiting for file changes before starting... :')

Ответить
@yangcui6010
@yangcui6010 - 21.04.2023 23:18

it keep saying that User.signup is not a function in postman, anyone knows why

Ответить
@MJstone587
@MJstone587 - 11.04.2023 19:23

Is there a benefit to creating the statics signup method in Schema Model vs doing all of that in the user creation controller method?

Ответить
@maozschory982
@maozschory982 - 28.03.2023 03:02

3 am, binge watching this lol
Tysm man your videos are amazing as always

Ответить
@khallikan
@khallikan - 27.03.2023 04:23

Should encrypting the password text be done in frontend first? Right now your frontend passes the plain text password to the signup function in the backend. Is it possible for hacker to get password a user inputs in the frontend before it gets passed to the backend?

Ответить
@Ta9i
@Ta9i - 23.03.2023 19:22

if you are having some errors like this.findOne is not a function, use normal functions don't use arrow functions, the this keyword binding differ
eddit : I wrote this comment before seeing the the end of the video it took a good 30min to realize my err but it was a good lesson lool

Ответить
@stavroskefaleas6320
@stavroskefaleas6320 - 21.03.2023 18:05

I believe that signup should return a 201 code since it creates a user.

Ответить
@Eslam-ig2gf
@Eslam-ig2gf - 12.03.2023 06:24

Ответить
@lewishinshelwood123
@lewishinshelwood123 - 10.02.2023 18:01

When I run it in thunder client (like postman) I'm getting error: User.signup is not a function

Please help??

Ответить
@Anonymous-zg8sr
@Anonymous-zg8sr - 03.01.2023 17:27

Hello, I'm a bit confused about that: when i created static method like this, i was getting error where it says cannot read property of undefined reading (create), so i realised that the problem was in the "this" keyword mainly in arrow function , so i have to change arrow function to function declaration, everything is okay now to me, but im so interested why you didn't get any error like to me?

Ответить
@herunumen
@herunumen - 28.12.2022 21:04

I'm stuck on this part. After installing bcrypt and making the changes to use it, i try npm run dev and there's an error that says 'Error: Cannot find module <file path>\bcrypt_lib.node' i tried reinstalling bcrypt, rebuilding the project, reinstalling node, using the code files provided by netninja and i can't progress. Can someone help?

Edit: I ended up using bcryptjs instead of bcrypt, it uses the same functions and syntax but without the dependencies that bcrypt needs. That fixed my compilation issue.

Ответить
@thegreatben27
@thegreatben27 - 03.12.2022 23:47

am getting this error, while trying to sign-up a new user on postman
": "data and salt arguments required". who can help with this

Ответить
@darchansuleimen3591
@darchansuleimen3591 - 15.11.2022 09:52

why to use bcrypt, if there is a standard nodejs lib crypto?

Ответить
@Cristopher86Vr
@Cristopher86Vr - 29.10.2022 13:29

i had a problem with adding a static to the userSchema, "this" doesn't works until i removed the arrow function. In the tutorial it works, anyone know the reason?

Ответить
@michalnowak2181
@michalnowak2181 - 13.10.2022 01:45

thx

Ответить
@codedude8253
@codedude8253 - 22.09.2022 17:32

I am getting an error at userController:
const {email,password} = req.body
UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'email' of 'req.body' as it is undefined.
Please help out....

Ответить
@eugenentamack5023
@eugenentamack5023 - 22.07.2022 22:48

Hello, Shaun Thank you i always learn a lot with your videos and your mern satck videos are among them. Again Tank-you

Ответить
@david-2
@david-2 - 21.07.2022 09:43

Why would you return the hashed password in the sign-up response?

Ответить
@n_fan329
@n_fan329 - 21.07.2022 07:56

Fell like watching Brad Traversy.....

Ответить
@maskman4821
@maskman4821 - 21.07.2022 07:55

Hello, Shaun, I wonder if you can build this app with Sveltekit server route and make it a tutorial, because with Sveltekit we don't need a separate backend such as express, hopefully Shaun take it into consideration 🙏

Ответить
@SirPoonga
@SirPoonga - 21.07.2022 00:34

Do you plan on securing the the transport of the password/hash from browser to server?

Ответить
@isaacqadri
@isaacqadri - 20.07.2022 19:50

🌟🎊😍

Ответить
@nemorashed4120
@nemorashed4120 - 20.07.2022 17:41

We need advanced authentication have multiple user's

Ответить
@nemorashed4120
@nemorashed4120 - 20.07.2022 17:40

Please can you add forget password

Ответить
@maskman4821
@maskman4821 - 20.07.2022 17:10

What an awesome tutorial 😍

Ответить
@alexpiano
@alexpiano - 20.07.2022 17:05

Great :) question, we're you planning to add Google authentication in addition to normal email auth? If so, you'll use passportjs or googleAuth from firebase? Authentication can get sooo complex and discouraging. passportjs documentation is also very badly organized, a real mess. Looking forward to the next lesson.

Ответить
@husanrasulov8846
@husanrasulov8846 - 20.07.2022 14:50

Thanks brother! It is amazing!

Ответить
@mehmetsayn573
@mehmetsayn573 - 20.07.2022 12:53

I think authentication is the hardest part in fullstack project. Is it safe to make authentication like that. Do we need more advanced authentication technologies like Keycloak and ORY. So I wanted to learn more on these technologies but could not find good tutorial how to integrate them in backend and frontend side

Ответить