FlowFuse / nr-launcher

A Laucher for Node-RED that allows settings to be loaded at startup.
Apache License 2.0
4 stars 6 forks source link

Generate absolute callback url ourselves #245

Closed knolleary closed 2 months ago

knolleary commented 2 months ago

Fixes #244

Description

This PR fixes the callback URL generation to map from relative to absolute URL on a per-request basis. We cannot use the built-in resolution used by passport-oauth2 due to the way our current FFC architecture handles inbound https requests.

Instead, we identified whether it should use https or http based on the authorizationURL setting as that will be consistent.

I've tested this change in the staging env using a custom container including this change. Also testing on localhost/localfs with http.