# Viewing the \`settings\` an alternate way - Problem?

**URL:** https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280
**Category:** General
**Created:** [27 January 2023 21:49 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280 "2023-01-27T21:49:44Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [27 January 2023 21:49 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280/1 "2023-01-27T21:49:44Z")

</div>

About a month ago I was being helped and I was asked to open a page:  
`(ip address):1880/settings`

And all I got was `unauthorized`

This was on a remote machine with passwords set.

If I do it on my local machine - NO PASSWORD set - it works.

Ok, I get it - kinda.  
That machine has passwords set.

But here's the _Rub_:  
If I open the `edit` screen and try to edit, I am prompted for the password then all is good.

It just seems strange that the `edit` screen asks for the password but the `settings` page doesn't.

---

<div class="post-metadata">

### Author: ![kevinGodell](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/kevingodell/32/27040_2.png) [@kevinGodell](https://discourse.nodered.org/u/kevinGodell)
#### Post date: [27 January 2023 22:41 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280/2 "2023-01-27T22:41:52Z")

</div>

It seems that the editor/admin page prompts for the password by design, while some of the other admin routes do not.

Open the developer console and look at the various requests when on the editor page and you will see that there are 2 types of auth headers:

```auto
Authorization: Basic dXNlcjA6OFtiUjAjLjshQzY7ekNpUiNlWXYhVk9bLFk=

```

```auto
Authorization: Bearer mkO5F3sKHjYsR2DaBaiPBqvon4wOOscWn3vP0w6DXaPh8C/UONODokMQphizc830etXx+ZYDeKrFxnOPAJ9dx96EwWR63gxHcJJZy3YOd2RXp1r6r5lBCDSe/s6n4cHSXDTh8XtU6AveOW6DezZp19GjgAFEEou21avmrnd189A=

```

The bearer token routes are the ones that you will not be able to just simply view in the browser directly. They are usually called from a node's config panel back to its route that was added to `RED.httpAdmin` and then protected with middleware `RED.auth.needsPermission`. The editor automatically patches the ajax requests with the necessary headers.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [27 January 2023 22:47 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280/3 "2023-01-27T22:47:16Z")

</div>

I am seeing a lot of words, but I am not understanding what they mean. (My problem)

I don't understand why it is that if there are passwords set, you can't open that page.  
Although I am also not sure what _good_ it would do if I could.

I've never opened that page before anyway.  
It was/is more an anomaly for me.

---

<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: [28 January 2023 00:16 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280/4 "2023-01-28T00:16:18Z")

</div>

> [@Trying\_to\_learn](#):
>
> But here's the _Rub_:  
> If I open the `edit` screen and try to edit, I am prompted for the password then all is good.
> 
> It just seems strange that the `edit` screen asks for the password but the `settings` page doesn't.

The `/settings` is an API endpoint used by the application. It isn't intended to be accessed directly by a user. It can only be accessed if the request includes the proper authentication header.

The editor is a full application. It copes with missing authentication information because it expects users to try accessing it and for them to need to login. Once they login, the editor knows how to include the proper authentication header when it makes requests to the api (such as to `/settings`).

Your browser does not know how to add the required headers by itself when you ask it to access the `/settings` route.

---

<div class="post-metadata">

### Author: ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)
#### Post date: [28 January 2023 00:32 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280/5 "2023-01-28T00:32:52Z")

</div>

Thanks for taking the time to explain it in words I better understand.

I still don't get the whole inter-relationship of it all, but how you explained it is slightly easier for me to understand.

I am having enough problems with structures of messages and how to parse them.  
At a program level - although probably the same - I am not going to say I understand it as poorly as I do at the message level.

---

<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: [11 February 2023 00:33 UTC](https://discourse.nodered.org/t/viewing-the-settings-an-alternate-way-problem/74280/6 "2023-02-11T00:33:36Z")

</div>

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