Comments (10)
Here is some info from the ruby implementation jist
. So one way I can handle this situation is to do the following the first time get_token
is run.
- ask user for username and password.
- use it to fetch a token for the gist scope.
- save the token in ~/.rCharts
- print a message to the user about the save and how to revoke access
The only thing left to think is (3), a location to save the token. Maybe .Rprofile? I need to brush up a bit on how R starts up.
If you want to associate your gists with your github account, you need to login
with jist. It doesn't store your username and password, it just uses them to get
an OAuth2 token (with the "gist" permission).
jist --login
Obtaining OAuth2 access_token from github.
Github username: ConradIrwin
Github password:
Success! https://github.com/settings/applications
This token is stored in ~/.jist
and used for all future gisting. If you need to
you can revoke it from https://github.com/settings/applications, or just delete the
file.
After you've done this, you can still upload gists anonymously with -a
.
from rcharts.
Another location where the token could be saved is the package directory (which most likely the user has write access to). The one advantage with this approach is cross-platform support. The disadvantage is that the token gets overwritten when a new version of the package is installed.
from rcharts.
While I am on this, I should add the ability to publish anonymously too. It could be a simple flag to the publish function that can do the trick
- add ability to publish gist anonymously.
- save token generated and use it across sessions.
from rcharts.
think it is something wrong with my local instance, but I'm now getting Error: Forbidden when I try to publish to gist. Any ideas?
from rcharts.
Try setting your username and password using
options(github.user = 'username', 'github.password' = 'password')
and try. I will be rewriting the publish
function to make use of basic authorization rather than OAuth, which is the case currently. Basic authorization is easier as it only requires a username and password and no token fetching, which is how the publish
function works currently.
from rcharts.
still does not work. The error comes in the get_token() function. Any way to delete the token?
from rcharts.
I am getting an error too. Just trying get_token(username, password)
is giving me an error. Let me see if I can push basic authorization quickly.
from rcharts.
Just pushed to github replacing oauth with basic auth. Try again and let me know if it works.
from rcharts.
works great as shown and closed in #42
from rcharts.
Using basic auth solves the issue for now, since no more token issuing occurs. There is still the problem of using readline for getting username and password, but that should be easy to fix since the options alternative always exists.
from rcharts.
Related Issues (20)
- Domain expiry of rcharts.io HOT 2
- Installation failed:comand failed(1) on windows 10
- Is there a way for me to modify the size of the circle in nvd3's interactive layer? HOT 1
- rCharts no longer works in a shiny application while using highcharter also
- dyLegend showZeroValues is broken HOT 1
- Remove legend from rChart
- nPlot prints text instead of graph
- Handling Cyclic or Circular data
- Why does it keep trying to install a new version of 'yaml'?? HOT 2
- rCharts dormant? HOT 2
- Hide all series EXCEPT selected series from legend HOT 1
- x axis wih Date variable shown in numbers rather than "Y-m-d" format
- rPlot no compatible with R 4.0 ?
- rCharts: Error in UseMethod("rPlot") : HOT 2
- Can't use rPlot for anything.
- Can't install packages(rCharts) for mac OS X 11.1 R4.0
- exporting function does not work anymore
- nPyramid function
- rCharts::Highcharts radar plot only renders legends in shiny
- r stock type r
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rcharts.