You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 9, 2020. It is now read-only.
I have to run my bots in a kubernetes cluster behind a software gateway (not on a public host).
This software gateway simply proxies requests for my bot, it accepts requests at https://bot.domain.com and relays them to http://mybot. This works well enough for messages.
The problem comes in when we add botauth: the options.basePath value is used for both route creation and as well as the generation of the callbackUrl and authUrl. So this means that our service endpoints can't be different from our auth and callback urls. Note that I can already do this with the code page by using options.successRedirect.
I'm sure this is by design (as the documentation always says your bot has to be running on a public host), but I'd find it useful if you added another botAuth option, say options.baseServicePath that can be used to define the routes on the server that do not necessarily match the externally exposed routes.
Obviously, issue 61 not withstanding, I think this could easily be done with:
// botauth/lib/index.js// .. line 40if(!this.options.baseServicePath){this.options.baseServiceUrl=this.options.baseUrl}// update these three lines. (around line 59)this.server.get(`/${this.options.baseServicePath}/:providerId`,this.options.resumption.persistHandler(),this.passport_redirect());this.server.get(`/${this.options.baseServicePath}/:providerId/callback`,this.passport_callback(),this.options.resumption.restoreHandler(),this.credential_callback());this.server.post(`/${this.options.baseServicePath}/:providerId/callback`,this.passport_callback(),this.options.resumption.restoreHandler(),this.credential_callback());
In any event, happy to contribute if that would work.
The text was updated successfully, but these errors were encountered:
I have to run my bots in a kubernetes cluster behind a software gateway (not on a public host).
This software gateway simply proxies requests for my bot, it accepts requests at https://bot.domain.com and relays them to http://mybot. This works well enough for messages.
The problem comes in when we add botauth: the
options.basePath
value is used for both route creation and as well as the generation of thecallbackUrl
andauthUrl
. So this means that our service endpoints can't be different from our auth and callback urls. Note that I can already do this with the code page by usingoptions.successRedirect
.I'm sure this is by design (as the documentation always says your bot has to be running on a public host), but I'd find it useful if you added another botAuth option, say
options.baseServicePath
that can be used to define the routes on the server that do not necessarily match the externally exposed routes.So for instance:
Would give me the following external URLS:
Which could easily be mapped in my gateway to my service routes:
Obviously, issue 61 not withstanding, I think this could easily be done with:
In any event, happy to contribute if that would work.
The text was updated successfully, but these errors were encountered: