All language subtitles for 011 Sending Password Reset Emails_Downloadly.ir_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranรฎ)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

Alright, now let's very quickly

also send emails for password resets,

and that email will be very similar to this one,

so let's just go ahead and copy all of this

into a new file,

passwordReset.pug,

and then paste that here.

Now, some of the text that we want here

I believe is already in the authController,

so down here in forgotPassword,

so right here, actually this message here

is kind of what we now want in our template,

so let's just grab that, put it here

in this first paragraph, now let's put this here

at the end of the email,

this one we don't need,

let's put it here into a separate paragraph,

then here, it's actually not this, okay,

but instead we use the URL here like this,

so an interpolation and then URL,

and also, we're actually putting that URL on this,

a green button right here.

So here, let's then say as a text, reset your password.

Then just here, as this paragraph, let's just say for now,

Website for this action

not yet implemented.

So that should be the template,

next up, let's actually create the sending function

here in our email class, so we have sendWelcome,

and now we have another situation

for which we want to emails, and so simply enough,

we add another method here,

so sendPasswordReset,

so await this.send,

and so now the template name

is called passwordReset,

so the one that we just created,

and now the subject line, which is going to be,

Your password reset token,

and lets also say, valid for only 10 minutes.

Okay, let's save that, and now as a final step,

we need to actually call this method here.

So in our authController, where before we had

all of this here, let's now say, await new Email,

just like we did before for the sign up,

and now let's find the current user,

and it's simply called user, and then the resetURL,

that we already defined before up here.

Okay, and then the method that we just created,

sendPasswordReset, and that's it.

Okay, so no defining of subject lines here,

also no defining of messages, and so we abstracted

all that away with our new, really nice email handler,

and let's actually put that one here also in the try block

to keep these two here really together.

Okay, and so this should be enough

that we can now actually test it.

Okay, so let's go to Postman, and let's actually

reset the password for this user that we just created

in the last lecture,

so Reset Password,

so that's actually not the one,

so in fact it is Forgot Password.

So here, all we need to specify is the email

and that should then get us our reset token, remember?

So when I now send this, then we get our success,

and so now we should also get our email,

and indeed, here it is.

So, beautiful!

So coming from hello@jonas.io,

and going to test3@natours.io

which is the user for which we just reset the password,

and so here is that URL,

and so now let's do the whole flow,

and actually really reset the password for this user.

So now we need to use the Reset Password route

and, well now let's delete all of this,

and then also this part, what really matters here

is just this token.

And now here, let's then set the new password,

and let's say actually newpassword,

and so that's the one we've been using

so that I don't forget it.

So let's try that, and with success.

Just as a final step, let's see if we

can actually log in to our website here.

So log in, I think I copied the email,

no I did not, so that's test3@natours.io,

and what I copied was the password.

So that was successful, and we have our default image here,

and now of course we could go ahead, upload it,

but we already know that that works,

and so we don't need to test it.

Now, at this point, as you already know,

all our emails are actually getting caught here in Mailtrap,

and so again, that's because in development mode,

we don't want to leak these emails here to real users,

also, we would have no way of taking a look at these emails

if they would really end up in our real users email inboxes,

and so again, that's why we use a service like this.

However, in the next video, we will then start to send

real emails, so emails to real email addresses,

which will then end up in their inboxes.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.