#  Can I get information of logged in user in a node in js file?

**URL:** <https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155>\
**Category:** General\
**Tags:** security, function-node, uibuilder\
**Created:** [8 August 2022 06:17 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155 "2022-08-08T06:17:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlackFlower](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@BlackFlower](https://discourse.nodered.org/u/BlackFlower)\
**Post date:** [8 August 2022 06:17 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/1 "2022-08-08T06:17:18Z")

</div>

Can I now get logged in user information when I'm on node-red-contrib?  
And how to get it?  
Thanks,

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 August 2022 08:20 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/2 "2022-08-08T08:20:00Z")

</div>

Is this a uibuilder question or general Node-RED?

How are you getting users to log in?

---

<div class="post-metadata">

**Author:** ![BlackFlower](https://avatars.discourse-cdn.com/v4/letter/b/c67d28/32.png) [@BlackFlower](https://discourse.nodered.org/u/BlackFlower)\
**Post date:** [8 August 2022 10:14 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/3 "2022-08-08T10:14:02Z")

</div>

I login to node-red with a json file and password

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [8 August 2022 10:29 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/4 "2022-08-08T10:29:12Z")

</div>

What is node-red-contrib???  
What do you mean you log in with a json file?

If you create a small flow demonstrating your login procedure and export it and attach it to a reply someone can take a look and answer your question.

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [8 August 2022 13:37 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/5 "2022-08-08T13:37:54Z")

</div>

As I answered on Stack Overflow ([node.js - Is there any way to get the information of the logged in user on node-red-contrib? - Stack Overflow](https://stackoverflow.com/questions/73272715/is-there-any-way-to-get-the-information-of-the-logged-in-user-on-node-red-contri/73274073#73274073)), you don't.

You are going to need to supply a LOT more context here about what exactly you are trying to do, but at runtime, knowing which user edited the flow is meaningless to processing messages as they pass through the flow. Flows do not run as a node-red user, the users are only for determining access control to edit the flow.

---

<div class="post-metadata">

**Author:** ![nensak](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@nensak](https://discourse.nodered.org/u/nensak)\
**Post date:** [16 August 2022 13:34 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/6 "2022-08-16T13:34:30Z")

</div>

Hello,  
I'd like to thank to Julian and all involved community for the development of nodered-contrib-uibilder. It's amazing job.  
For making nice looking professional dashboard, using of front end libraries is mandatory, and there's a big need for contrib-uibuilder compared to uibuilder in my opinion in that field.  
I spent a lot of time during last year learning Nodered and fallowing posts, docs, and so on, but what I'm still missing is an example of login mechanism?!  
Can anyone provide a working example for user authentication of users on nodered-contrib-uibuilder V5 dashboard?  
Many thanks and regards

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [16 August 2022 13:47 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/7 "2022-08-16T13:47:12Z")

</div>

@nensak I think you will do better asking this as it's own thread, as it's really not clear what the OP was asking about and even with the best guess, it's not the same as your question.

---

<div class="post-metadata">

**Author:** ![nensak](https://avatars.discourse-cdn.com/v4/letter/n/9f8e36/32.png) [@nensak](https://discourse.nodered.org/u/nensak)\
**Post date:** [16 August 2022 14:07 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/8 "2022-08-16T14:07:22Z")

</div>

OK thank you, I'll start new one  
Br

---

<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:** [15 October 2022 14:07 UTC](https://discourse.nodered.org/t/can-i-get-information-of-logged-in-user-in-a-node-in-js-file/66155/9 "2022-10-15T14:07:24Z")

</div>

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