# Adding login to ui dashboard as flow page?

**URL:** <https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770>\
**Category:** Dashboard\
**Created:** [19 December 2020 19:47 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770 "2020-12-19T19:47:31Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![halukmy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/halukmy/32/31192_2.png) [@halukmy](https://discourse.nodered.org/u/halukmy)\
**Post date:** [19 December 2020 19:47 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/1 "2020-12-19T19:47:31Z")

</div>

Greetings everybody,

i am now using

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/37351f61ca0f5fdffb01194d4deb43c46fbe9cd3.png)  
this login, but this not works on /ui

how can i add this security to ui too?

---

<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:** [19 December 2020 20:47 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/2 "2020-12-19T20:47:09Z")

</div>

The dashboard node readme has the information you are looking for.

> **[node-red-dashboard](https://flows.nodered.org/node/node-red-dashboard#securing-the-dashboard)**
>
> A set of dashboard nodes for Node-RED

---

<div class="post-metadata">

**Author:** ![halukmy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/halukmy/32/31192_2.png) [@halukmy](https://discourse.nodered.org/u/halukmy)\
**Post date:** [22 December 2020 21:45 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/3 "2020-12-22T21:45:15Z")

</div>

i knew it, but its not lockable, can you share an example please?

---

<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:** [22 December 2020 21:46 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/4 "2020-12-22T21:46:33Z")

</div>

The readme says this:

> You can use the `httpNodeAuth` property in your Node-RED settings.js file to secure the Dashboard as it is created the same way as other HTTP nodes are. The details can be found at the bottom of this page in the docs [Redirecting…](http://nodered.org/docs/security)

So have you tried setting `httpNodeAuth` to enable basic authentication on the dashboard?

---

<div class="post-metadata">

**Author:** ![halukmy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/halukmy/32/31192_2.png) [@halukmy](https://discourse.nodered.org/u/halukmy)\
**Post date:** [22 December 2020 22:00 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/5 "2020-12-22T22:00:47Z")

</div>

> [@knolleary](#):
>
> `httpNodeAuth`

actually yeah,

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

i made it and now its locked, flows are safe

but when i type

/ui

everything visible 🙂

---

<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:** [22 December 2020 22:02 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/6 "2020-12-22T22:02:26Z")

</div>

That is the `adminAuth` setting rather than the `httpNodeAuth` one.

---

<div class="post-metadata">

**Author:** ![halukmy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/halukmy/32/31192_2.png) [@halukmy](https://discourse.nodered.org/u/halukmy)\
**Post date:** [22 December 2020 22:16 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/7 "2020-12-22T22:16:01Z")

</div>

> [@TotallyInformation](#):
>
> `httpNodeAuth`

i still cant find `httpNodeAuth` where should i add from?

---

<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:** [22 December 2020 22:19 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/9 "2020-12-22T22:19:24Z")

</div>

From my settings.js file:

```auto
    //#region ------ Securing Node-RED ------ //

    /** To password protect the Node-RED editor and admin API, the following
     * property can be used. See http://nodered.org/docs/security.html for details.
     */
    // adminAuth: {
        // type: "credentials",
        // // sessionExpiryTime: 604800, // in secs, default 7d=604800
        // default: {
        // permissions: "*"
        // },
        // users: [
        // {
        // username: "admin",
        // // `reader`
        // password: "$2a$08$wmsrXbrhacO5v15.vr/jWOk54pRcbqWdOljStdMycrnFbYF.kTctu",
        // permissions: "*"
        // },{
        // username: "reader",
        // password: "$2a$08$wmsrXbrhacO5v15.vr/jWOk54pRcbqWdOljStdMycrnFbYF.kTctu",
        // permissions: "read"
        // },{
        // username: "uibreader",
        // password: "$2a$08$wmsrXbrhacO5v15.vr/jWOk54pRcbqWdOljStdMycrnFbYF.kTctu",
        // permissions: "uibuilder.read"
        // },
        // ],
    // },

    /** To password protect the node-defined HTTP endpoints (httpNodeRoot), or
     * the static content (httpStatic), the following properties can be used.
     * The pass field is a bcrypt hash of the password.
     * See http://nodered.org/docs/security.html#generating-the-password-hash
     */
    //httpNodeAuth: {user:'user',pass:'$2a$08$XPzmmEYTvmUI75ajrc.mheyvRKSoZAUwQYDgdmlYLUp3eP6JQrz1m'}, //pass="pw"
    //httpStaticAuth: {user:'user',pass:'$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN.'},

```

---

<div class="post-metadata">

**Author:** ![halukmy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/halukmy/32/31192_2.png) [@halukmy](https://discourse.nodered.org/u/halukmy)\
**Post date:** [22 December 2020 22:20 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/10 "2020-12-22T22:20:31Z")

</div>

> [@knolleary](#):
>
> `httpNodeAuth`

thanks you!

---

<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:** [21 January 2021 22:20 UTC](https://discourse.nodered.org/t/adding-login-to-ui-dashboard-as-flow-page/37770/11 "2021-01-21T22:20:54Z")

</div>

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