Serve node-editor on multiple urls? Flowfuse Oauth

Hi folks.

New to node red.

MAIN Question - Can you serve the node editor to multiple urls, and would it be through something like express using express static or RED.httpAdmin in the settings.js? Please answer this first.

Backstory.

I have node-red, oauth-contrib, and flowfuse dashboard, but I can't for the life of me make it all work together, as the normal http in/functions/msg payloads don't work with flowfuse.
I just want oauth for my flowfuse dashboard, lol.

So, with a bit of clever(shameful) workarounds, I managed to direct dashboard urls to my google callback strategy when user is null, and then redirect them back to my dashboard at the expense of my node editor, lol.

//ui solution for minimal security
    dashboard: {
        middleware: (response, next) => {
            const globalContext = RED.settings.functionGlobalContext;

            if (globalContext && globalContext.userEmail) {
                return next();
            } else {
                response.redirect('/auth/strategy');
            }
        }
    },
httpAdminMiddleware: function (req, res, next) {
        if (req.path === '/') {
            res.redirect('/dashboard');
        } else {
            next();
        }
    },

Oauth for my dashboard without anyone seeing the editor! Save emails for easy email logging if people do things. Huzzah!

Problem is my node editor url is out of commission lol since it redirects to the dashboard. So does anyone have a solution to serving the editor onto a parallel url?
I also welcome shame, criticism, and alternative ways to get my stuff done, but please, answer my question first. :slight_smile:

Thanks in advance!

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