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

Work around listener errors introduced in #211 #235

Merged
merged 6 commits into from May 22, 2015
Merged

Work around listener errors introduced in #211 #235

merged 6 commits into from May 22, 2015

Conversation

cboettig
Copy link
Contributor

@hadley I've taken the short-cut of just modifying the listener method to read the environmental variables directly, and removed the option to pass down explicit host and port in oauth_init and oauth_token functions.

I did try modifying the R6 initialization structures to include a listener object that would store this, but am not very solid on R6 methods and their inheritance behavior; or how this would interact with caching. Making so many changes to internal plumbing just to add support for a feature most people would only configure with environmental variables, if at all, seemed unwise, so I opted for this cop-out.

Sincere apologies for the incomplete implementation in #211 and also for the imperfect git log history here...

@@ -77,3 +77,14 @@ oauth_listener <- function(request_url, is_interactive = interactive(), host = "
oauth_callback <- function() {
"http://localhost:1410/"
}

listener_endpoint <- function ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please follow house style? (e.g. http://r-pkgs.had.co.nz/r.html#style)

…ell.

Note that this is required even in non-dockerized versions, e.g. when running RStudio-server from a cluster.  The dockerized sitation
is worse, in that HTTP_LOCALHOST must be set to 0.0.0.0, while the callback (HTTP_SERVER) must be set to the server's IP address instead.
In non-dockerized instances running on a server, both HTTP_LOCALHOST and HTTP_SERVER would simply be the server's IP
@daattali
Copy link
Contributor

super useful, thanks Carl

hadley added a commit that referenced this pull request May 22, 2015
Work around listener errors introduced in #211
@hadley hadley merged commit e8a85c0 into r-lib:master May 22, 2015
@hadley
Copy link
Member

hadley commented May 22, 2015

Thanks! BTW I only get notifications on comments, not additional commits, so when you're done with requested changes it's helpful to comment with PTAL or similar.

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

Successfully merging this pull request may close these issues.

None yet

3 participants