# Where to start with login?

**URL:** https://discourse.nodered.org/t/where-to-start-with-login/97358
**Category:** Dashboard
**Tags:** dashboard-2
**Created:** [1 June 2025 03:43 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358 "2025-06-01T03:43:02Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![ath0rus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ath0rus/32/95404_2.png) [@ath0rus](https://discourse.nodered.org/u/ath0rus)
#### Post date: [1 June 2025 03:43 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/1 "2025-06-01T03:43:02Z")

</div>

Hi,

I’m building a Dashboard (FlowFuse dashboard 2.0) to control my game servers and a few other things. At some point soon, I want to make parts of it accessible over the internet (to friends), so I’ll be looking into enabling HTTPS in NR and using Let’s Encrypt for SSL.

Is there a way to add a login screen to the dashboard so random people can’t mess with it? Ideally, I want to add “Login with Discord” later, but for now, I just want a simple username and password setup.

I can make a basic login page in the dashboard that redirects to other pages after login, but my main concern is doing it securely, mainly stopping people from bypassing the login by visiting a direct link, and making sure logged in users don’t get logged out randomly (as long as their browser keeps the cookie/info they stay logged in).

I’ve seen similar posts about this, but I’m really just looking for a good starting point: What should I look into? Are there any specific Node-RED palettes or external tools/software you’d recommend for handling logins securely?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [1 June 2025 10:28 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/2 "2025-06-01T10:28:14Z")

</div>

Read this

> [@Safely accessing Node-RED over the Internet](https://discourse.nodered.org/t/safely-accessing-node-red-over-the-internet/45024):
>
> Update 2025-02-19 The best advice for most people doing home automation is still: Don't expose Node-RED to the outside world! Where you really have to have some outside access, keep it as hands-off and restricted as possible. For example, using a Telegram bot. Also keep it as minimal as possible, e.g. Don't expose the Editor - EVER! If you want to provide remote control of your heating or the precious plants in your greenhouse, provide explicit controls with strong limits. Don't expose ever…

I use Cloudflare Zero Trust, and Tailscale, though the latter is a VPN based solution which may not be what you want.

---

<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: [1 June 2025 10:39 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/3 "2025-06-01T10:39:08Z")

</div>

> [@ath0rus](#):
>
> Is there a way to add a login screen to the dashboard so random people can’t mess with it? Ideally, I want to add “Login with Discord” later, but for now, I just want a simple username and password setup.

You will need to check out how to use a Discord login, not sure how easy that is. But in general, something like Cloudflare Zero Trust would fit the bill. CF ZT will provide the authentication aspects and it acts as a cloud proxy between your users and your Dashboard page.

* * *

_Brave's Leo AI had this to say - I've not tested it._

To authenticate using Discord on Cloudflare Zero Trust, you can follow these steps:

1. Edit your Cloudflare Access subdomain into `config.json` under `redirectURL` . This should be the same URL you added to Discord.
2. Publish the Worker with `npx wrangler publish!` .
3. Go to the Cloudflare Zero Trust dashboard and navigate to Settings \> Authentication.
4. Select "Add new" under Login methods and choose OpenID Connect.
5. Fill in the necessary fields:

- Name: Whatever you want, e.g., Discord
- App ID: Your Discord application ID
- Client secret: Your Discord application OAuth2 secret
- Auth URL: `https://discord-oidc.YOURNAME.workers.dev/authorize/email` or swap out `/email` for `/guilds` to include the Guilds scope
- Token URL: `https://discord-oidc.YOURNAME.workers.dev/token`
- Certificate URL: `https://discord-oidc.YOURNAME.workers.dev/jwks.json`
- Proof Key for Code Exchange (PKCE): Enabled
- OIDC Claims: Email is included automatically without being set here. It would be recommended to add `id` here, as the user's unique Discord user ID. `preferred_username` will map to the user's username and discriminator if they have one.

After setting up the Discord authentication, you can use custom OIDC claims to control user access based on specific attributes.4

To use this in a policy, simply enable it as an Identity provider in your Access application and then create a rule using OIDC Claims and the relevant claim above.

---

<div class="post-metadata">

### Author: ![ath0rus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ath0rus/32/95404_2.png) [@ath0rus](https://discourse.nodered.org/u/ath0rus)
#### Post date: [1 June 2025 11:36 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/4 "2025-06-01T11:36:54Z")

</div>

> [@Colin](#):
>
> Cloudflare Zero Trust

Thanks, I will have to look into that.

> [@Colin](#):
>
> Tailscale

I already use Tailscale to access my Nas and other server pc remotely, very handy, But I need to share it with a few friends and don't want to add them to my tailscale

---

<div class="post-metadata">

### Author: ![joepavitt](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/joepavitt/32/59722_2.png) [@joepavitt](https://discourse.nodered.org/u/joepavitt)
#### Post date: [2 June 2025 08:25 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/5 "2025-06-02T08:25:14Z")

</div>

There are a few multi-tenancy options for Dashboard: [Building Multi-Tenant Dashboards | Node-RED Dashboard 2.0](https://dashboard.flowfuse.com/user/multi-tenancy.html)

These can be used with a `ui-event` node which can route users accordingly depending on their permissions.

---

<div class="post-metadata">

### Author: ![ath0rus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ath0rus/32/95404_2.png) [@ath0rus](https://discourse.nodered.org/u/ath0rus)
#### Post date: [2 June 2025 10:42 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/6 "2025-06-02T10:42:55Z")

</div>

Thanks for that Info, I will have to give it a good read when I get the chance. Im curious as to how the cloudflare part works (the domain I want to use is with cloudflare). Im curious as to how it authenticates users via login. Im guessing I need to read the page you sent and that will tell me alot

---

<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: [2 June 2025 12:22 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/7 "2025-06-02T12:22:16Z")

</div>

> [@ath0rus](#):
>
> Im guessing I need to read the page you sent and that will tell me alot

Yup. You can have up to 50 users on the free tier. You can hand off authentication to 3rd-parties as well such as GitHub, etc using OAuth modern authentication. Not hard to do.

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [2 June 2025 18:39 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/8 "2025-06-02T18:39:06Z")

</div>

> [@ath0rus](#):
>
> Im curious as to how it authenticates users via login

I use it with google Oath login, where only specific email addresses are allowed access.

---

<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: [2 June 2025 19:25 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/9 "2025-06-02T19:25:09Z")

</div>

And I've used GitHub logins sometimes.

---

<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: [2 July 2025 19:26 UTC](https://discourse.nodered.org/t/where-to-start-with-login/97358/10 "2025-07-02T19:26:08Z")

</div>

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