Okay, so it seems this may not be the best place to use SiteSetting and might be best to stick to ENV, as now it is capable of reading the SiteSetting, but because it is registered when Discourse starts, it doesn’t and potentially can’t, pick up on changes to the SiteSettings it refers to without stopping and starting Discourse again.
My Steps that seem to indicate this
- Installed an oauth plugin using SiteSetting inside register_middleware
- Update SiteSettings
- Attempt login using ‘with Authenicator’
- Get OAuth Bad Parameters error
- Stop/Start Discourse
- Attempt login
- Success!
So unless there is a way to de-register and re-register the middleware, I’m not sure storing this data in SiteSetting is going to help anything. @def, are you seeing similar results?