Send Cookie To User Authentication | How To Send Cookie In Browser For Authentication | API Course

preview_player
Показать описание
Send Cookie To User Authentication

This route handler will set a cookie named Authorization with a value of Bearer XYZ in the client's browser when the /login route is accessed. The cookie will expire in one hour and will be accessible only to the server (i.e. it will not be accessible to client-side JavaScript).

You can then access the cookie from the client-side by using the getCookie() function:

This will retrieve the value of the Authorization cookie, which can be used for authentication purposes.

For any help related to code Errors, Please Join the Discord server

===================
HOSTING
++++++++++++++++++++

Follow Me:

Workout Video:
Рекомендации по теме
Комментарии
Автор

the cookie appears in postman but when I use the browser in the localhost it doesnt appear, any idea how to make it appear?

theboycool
Автор

Hi the cookies only shows in posman when i use browser it didnt appear. Kindly provide a solution

zenoraa
Автор

After deployment it's not generating the cooklie in browser what do i do ?? Please help me

yashpataliya
Автор

Hii can we store the cookie without local host

devasaivarshitha
Автор

cookie is showing in postman but not showing in browser(application-> cookie)

Tonystark-vezu
Автор

is it safe to use cookies of other users? will they be able to access our all data and files in our computer and other websites?

Sabinstha
Автор

how to send this cookie again to server for verification instead of token using nodejs

mukeshprajapat