-
Notifications
You must be signed in to change notification settings - Fork 91
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
Ability to refresh oauth token? #98
Comments
Are you storing an instance on disk, per: |
Yes. Or at least attempting to. I'm taking over code from a previous developer so perhaps it's not correct. Here's what I have now. Should I be doing an open 3 times, or perhaps combine into one command? Do I need to fill in a specific file path after the "where" below, or does this default to the WD? library(rga) |
No, 3 calls are not needed. This is what I do:
The
The |
OK, makes sense. I've kept it as Home (~/ga.rga), but I'm getting the following error: "Error in if (.self$tokenExpiresIn() <= 0) { : argument is of length zero" I'm just running the following: library(rga) I've also tried running the following first, in case I needed to store the ID/CS first: ga.clientId <- "[myclientidhere]" I get the same error each time. I've also tried running just rga.open(instance="ga") and pasting in the code just in case I needed to have a successful instance opened at least once. When I do that the code you suggested works fine. But if I close R Studio and re-open, thereby ending the instance, I can't just run the code you suggested without getting that same "length zero" error. What am I missing? I really appreciate your help with this. I assuming I'm just missing something basic. |
When using the
And, remember that every time you modify |
Damn, I had already done that. Still getting that error. Not sure it's related to the GetOPtion, though. Because I still get the error even if I just declare it in the code such as rga.open(instance = "ga", where="~/ga.rga", I definitely intend to use the GetOption, though. Just doesn't seem to impact the error. |
Maybe the There's a status function that might provide some insight:
|
Good call. That's exactly what I did and it seems to be working. I noticed that the timestamp for the ga.rga file wasn't updating even when I authenticated. So I deleted the file, closed down everything and started over. This time when I ran the code it asked me to authenticate and created a new ga.rga file. I was just testing it before I posted an update. Thanks for your help with this! |
I have a script that runs automatically on a server every day. Unfortunately, any time that server gets rebooted the script crashes because there's no one there to paste in the authentication code. I've used other packages in the past that have some kind of oauth_token$refresh() function. Any way to do that with this package?
The text was updated successfully, but these errors were encountered: