Closed col-panic closed 4 years ago
Hi @col-panic, this isn't a use case that we had previously needed but it's definitely a valid one.
Do you have any ideas on how this could be implemented?
I did an implementation of a possible solution once that fixed this. I described it in https://github.com/SohoHouse/nuxt-oauth/issues/18 - the approach you proposed there did not work out for me.
Unfortunately, in the meantime I switched away from nuxt to a plain vue.js based solution. I deliver the configuration data via an nginx based configuratoin that serves a different config.js file based on the resp. name based host. I then read this config.js on startup and derive the correct oauth server from it.
I remember the issue. I still believe there's a solution in there somewhere, we will be needing it at some point so if you ever need to return to Nuxt, check back here.
I'll leave this issue open in case we get a fix.
This has been fixed a while ago with providing functions for OAuth config.
I have deployed the nuxt app behind an nginx proxy. The proxy does forward wildcard domains like a.myexample.com and b.myexample.com to the nuxt.js instance.
a.myexaple.com uses oauth host a, and b.myexample.com uses oauth host b. I can differentiate those via the incoming request.
Now the problem is, that this seems to be done only once - so it isn't really dynamic.
If I start browser A and access a.myexample.com it binds against oauth host a. If I then start browser B and access b.myexample.com - no binding against host b happens (at least the resp. code does not seem to be called).
So if selection of the oauth host only happens once after startup - to what degree is the configuration dynamic?
thanks