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
When serving Horizon app files statically from another host, oauth currently will not work as there is no mechanism for Horizon Server to redirect you back to the static file host following a successful/unsuccessful oauth authentication attempt.
@Tryneus suggests having a variable in the Horizon Server config file which is the explicit host and path which the server should redirect to following the authentication attempt.
An example could(?) work like this:
On the static file server - app.horizon.internal-cloud.com
Since one might have multiple, generated, or might not have easily human-readable host names, the Horizon Client API should have some sort of short hand like this:
varhorizon=Horizon({host: "server.horizon.internal-cloud.com:37182",authType: "token"});// ...// User clicks on Twitter Login Button// This redirects browser to "server.horizon.internal-cloud.com:37182/horizon/twitter" horizon.auth("twitter").redirect()
On Horizon Server - server.horizon.internal-cloud.com
Go through typical oauth process
Concluding (un)successful authentication, Horizon Server checks configuration file and redirects them back to app.horizon.internal-cloud.com?horizon-jwt=.....
Back on static file server - app.horizon.internal-cloud.com
The Horizon Client Library sees the query params and properly stores the horizon_jwt in localStorage. (current and complete functionality)
The text was updated successfully, but these errors were encountered:
When serving Horizon app files statically from another host, oauth currently will not work as there is no mechanism for Horizon Server to redirect you back to the static file host following a successful/unsuccessful oauth authentication attempt.
@Tryneus suggests having a variable in the Horizon Server config file which is the explicit host and path which the server should redirect to following the authentication attempt.
An example could(?) work like this:
On the static file server -
app.horizon.internal-cloud.com
Since one might have multiple, generated, or might not have easily human-readable host names, the Horizon Client API should have some sort of short hand like this:
On Horizon Server -
server.horizon.internal-cloud.com
app.horizon.internal-cloud.com?horizon-jwt=.....
Back on static file server -
app.horizon.internal-cloud.com
The Horizon Client Library sees the query params and properly stores the
horizon_jwt
inlocalStorage
. (current and complete functionality)The text was updated successfully, but these errors were encountered: