Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizon Server should support authentication from other host #230

Open
dalanmiller opened this issue Apr 5, 2016 · 2 comments
Open

Horizon Server should support authentication from other host #230

dalanmiller opened this issue Apr 5, 2016 · 2 comments

Comments

@dalanmiller
Copy link
Contributor

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:

var horizon = 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)

@deontologician deontologician added this to the Release 1.0 polish milestone Apr 17, 2016
@deontologician deontologician modified the milestones: Release 1.1, Release 1.0 polish May 12, 2016
@deontologician deontologician modified the milestones: Release 1.x.x, First post-2.0 release Jun 28, 2016
@deontologician
Copy link
Contributor

@dalanmiller @Tryneus is the auth_redirect property the fix for this?

@deontologician
Copy link
Contributor

Needs verification this doesn't currently work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants