# Auto-login on local access

**URL:** <https://discourse.nodered.org/t/auto-login-on-local-access/6895>\
**Category:** Dashboard\
**Created:** [17 January 2019 02:11 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895 "2019-01-17T02:11:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![TurboTronix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/turbotronix/32/5131_2.png) [@TurboTronix](https://discourse.nodered.org/u/TurboTronix)\
**Post date:** [17 January 2019 02:11 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895/1 "2019-01-17T02:11:04Z")

</div>

Is there a way to make my Pi auto-login to my dashboard? Basically if the dashboard is accessed from my Pi (where node-red is located) it will bypass the authentication.

---

<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:** [18 January 2019 10:37 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895/2 "2019-01-18T10:37:12Z")

</div>

I think you could probably do that with a custom authentication (see the `settings.js` file for the property that controls that) but no, not natively.

---

<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:** [18 January 2019 10:39 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895/3 "2019-01-18T10:39:08Z")

</div>

> [@TotallyInformation](#):
>
> do that with a custom authentication

We do not support custom authentication for the Dashboard - only for the editor.

---

<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:** [18 January 2019 10:41 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895/4 "2019-01-18T10:41:34Z")

</div>

> [@knolleary](#):
>
> > do that with a custom authentication
> 
> We do not support custom authentication for the Dashboard - only for the editor.

Badly worded as usual. I meant:

```auto
    // The following property can be used to add a custom middleware function
    // in front of all http in nodes. This allows custom authentication to be
    // applied to all http in nodes, or any other sort of common request processing.
    //httpNodeMiddleware: function(req,res,next) {
    // // Handle/reject the request, or pass it on to the http in node by calling next();
    // // Optionally skip our rawBodyParser by setting this to true;
    // //req.skipRawBodyParser = true;
    // next();
    //},

    // The following property can be used to verify websocket connection attempts.
    // This allows, for example, the HTTP request headers to be checked to ensure
    // they include valid authentication information.
    //webSocketNodeVerifyClient: function(info) {
        // 'info' has three properties:
        // - origin : the value in the Origin header
        // - req : the HTTP request
        // - secure : true if req.connection.authorized or req.connection.encrypted is set
        //
        // The function should return true if the connection should be accepted, false otherwise.
        //
        // Alternatively, if this function is defined to accept a second argument, callback,
        // it can be used to verify the client asynchronously.
        // The callback takes three arguments:
        // - result : boolean, whether to accept the connection or not
        // - code : if result is false, the HTTP error status to return
        // - reason: if result is false, the HTTP reason string to return
    //},

```

Don't they work with Dashboard?

---

<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:** [18 January 2019 10:43 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895/5 "2019-01-18T10:43:03Z")

</div>

No, `httpNodeMiddleware` only applies to the HTTP In nodes.

---

<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:** [18 January 2019 11:16 UTC](https://discourse.nodered.org/t/auto-login-on-local-access/6895/6 "2019-01-18T11:16:45Z")

</div>

And node-red-contrib-uibuilder 😄
