# Fetching browser cookie in node red

**URL:** <https://discourse.nodered.org/t/fetching-browser-cookie-in-node-red/77451>\
**Category:** General\
**Created:** [11 April 2023 09:17 UTC](https://discourse.nodered.org/t/fetching-browser-cookie-in-node-red/77451 "2023-04-11T09:17:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suraj\_k](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@suraj\_k](https://discourse.nodered.org/u/suraj_k)\
**Post date:** [11 April 2023 09:17 UTC](https://discourse.nodered.org/t/fetching-browser-cookie-in-node-red/77451/1 "2023-04-11T09:17:06Z")

</div>

Hi.

Is there any way of fetching browser cookie inside authentication function ? basically I want to fetch cookie what i get from browser into my settings.js file.  
I Want to fetch from the below cookie

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/8/28607606e414d3b2ff32c6ff86a5305bc8cb0adb.png)

I want to fetch it in this code below

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/1/c111404fedc5812e8923b5d89756687009952ac6.png)

Please do let me know if is there any possibility I can do to get the cookie.

Thanks!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [11 April 2023 09:23 UTC](https://discourse.nodered.org/t/fetching-browser-cookie-in-node-red/77451/2 "2023-04-11T09:23:30Z")

</div>

No, the authenticate function is used for username/password based authentication - and that's all the function is provided.

Can you explain why you want to access the cookie as part of your authentication? There may be more suitable alternatives available.

---

<div class="post-metadata">

**Author:** ![suraj\_k](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@suraj\_k](https://discourse.nodered.org/u/suraj_k)\
**Post date:** [11 April 2023 09:32 UTC](https://discourse.nodered.org/t/fetching-browser-cookie-in-node-red/77451/3 "2023-04-11T09:32:49Z")

</div>

by fetching cookie or token, I want to verify if my user has read or write permission. basically this need to be done without any login. if not authentication maybe some other alternative?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [10 June 2023 09:33 UTC](https://discourse.nodered.org/t/fetching-browser-cookie-in-node-red/77451/4 "2023-06-10T09:33:36Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
