box_auth() without localhost

291 views Asked by At

I'm trying to use the boxr package to link my box account to R-Server.

I get as far in the box_auth() instructions as step 3 from the box pdf https://cran.r-project.org/web/packages/boxr/boxr.pdf A window pops up and I authorise connection then I get the error 'Safari can't connect to the server'. I have no knowledge of how apache or web development works so forgive my naivety, I've come to understand the problem is I don't have localhost set up on my Mac.

I'm unable to turn these features on because it requires admin rights and my company won't allow users to have this.

Is there something else I can put in the redirect_uri box apart from localhost that will allow this to authenticate?

Thanks

2

There are 2 answers

0
Rebecca Carruthers On

The issue i had was mostly that authenticating box through R-Server isn't supported. https://github.com/brendan-r/boxr/issues/23

To get around this I used my personal laptop to authenticate locally then uploaded the .Renviron and .boxr-oauth files to R server (which is the advice in the github post)

This was slightly tricky as R wasn't showing the .boxr-oauth file but I managed to copy it to a folder, zip the folder, then upload that to R-Server.

Now running the box_auth() function authenticates as it should.

0
Nate On

As of v0.3.5 (November 2019) boxr has a new alternative authentication method designed for remote servers, box_auth_service(), that closes issue 23. It's slightly is different than the oAuth way, because it uses "Service" accounts as the actors instead of the "User" account. But the "Service" accounts are what's needed to maintain security within a organization, so we opted for that. Please open an issue on the repo if you run into any issues.