# Password adminAuth not working

**URL:** https://discourse.nodered.org/t/password-adminauth-not-working/57753
**Category:** General
**Tags:** security
**Created:** [4 February 2022 05:34 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753 "2022-02-04T05:34:13Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Netplayjoe](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@Netplayjoe](https://discourse.nodered.org/u/Netplayjoe)
#### Post date: [4 February 2022 05:34 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/1 "2022-02-04T05:34:13Z")

</div>

New user here.  
I have enabled adminAuth using the default user/pass. It worked great. Once. Now when I open the workspace it doesn't ask for credentials, it just opens like adminAuth is not enabled. Tried Edge and Chrome, and with both the first time I connect it asks for user/pass, then every time after it doesn't. I am not letting the browser store the credentials in their pw managers.  
I've hashed up a new pw but no luck.

Thanks for any help,

Joe

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [4 February 2022 05:51 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/2 "2022-02-04T05:51:36Z")

</div>

This is normal and working as expected.

The token for your session is stored in your browser's local storage after you log in. It has a validity of one week.

So if you're not using a private window/tab ("incognito mode") or clear your data on exit (or explicitly log out), you will stay logged in.

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [4 February 2022 07:29 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/3 "2022-02-04T07:29:50Z")

</div>

I was about to write a post for the same issue....

> [@Simple Password Authentication for Dashboard (Caution: Very Low Security, for simple application only)](https://discourse.nodered.org/t/simple-password-authentication-for-dashboard-caution-very-low-security-for-simple-application-only/57714/3):
>
> (asks for a password when I open the editor (well, not every time exactly, even though i have NOT SAVED password in browser but many times the editor opens up without asking for password) that is for another post)

---

<div class="post-metadata">

### Author: ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)
#### Post date: [4 February 2022 07:30 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/4 "2022-02-04T07:30:27Z")

</div>

> [@kuema](#):
>
> It has a validity of one week.

can this be changed to say one hour ?

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [4 February 2022 07:41 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/5 "2022-02-04T07:41:55Z")

</div>

~~My _guess_ would be via settings.js. But it's undocumented, so you'd have to try it or ask one of the developers.~~

EDIT: It _is_ documented, but not in the settings.js by default. See Nicks comment below. 😳

---

<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: [4 February 2022 07:43 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/6 "2022-02-04T07:43:16Z")

</div>

Documented here: [Securing Node-RED : Node-RED](https://nodered.org/docs/user-guide/runtime/securing-node-red#token-expiration)

---

<div class="post-metadata">

### Author: ![kuema](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kuema/32/6542_2.png) [@kuema](https://discourse.nodered.org/u/kuema)
#### Post date: [4 February 2022 07:44 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/7 "2022-02-04T07:44:57Z")

</div>

Ah, thanks Nick.

I have only looked in the settings.js for that. 🙂

---

<div class="post-metadata">

### Author: ![Netplayjoe](https://avatars.discourse-cdn.com/v4/letter/n/9fc348/32.png) [@Netplayjoe](https://discourse.nodered.org/u/Netplayjoe)
#### Post date: [4 February 2022 13:19 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/8 "2022-02-04T13:19:01Z")

</div>

Thank you for the quick and useful information everyone! I do appreciate it. I will try the recommendations.

---

<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: [5 April 2022 13:19 UTC](https://discourse.nodered.org/t/password-adminauth-not-working/57753/9 "2022-04-05T13:19:43Z")

</div>

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