-
Notifications
You must be signed in to change notification settings - Fork 141
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
Save client id and secret when using grive -a #242
Conversation
Oh, please look over my changes, this is basically my first |
cc: @redmercury @0x3333 as they were in the contributer/discussers in #160 |
Unfortunately, this seems to not work: after sign in and getting the gibberish code to input into the cli, I get this error:
|
Seems the error was related to how to create the oauth2 client and the new instruction in the readme fixed the auth error for me. I've a working grive client again, yay :-) |
} | ||
} | ||
|
||
// This is not included in the below 'refresh-token' try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've a commit locally where I put that into the same try block, but that would error on upgrade because teh .grive file would not include a already saved client id/secret. -> Not backward compatible. It would save 10 lines of duplicatec code, though...
d20a93c
to
3bf6f81
Compare
Hi, PS: I am using it on Entware |
See the reeadme additions in this pr. |
After
|
I had that error as well but I think i solved that by following the steps in the (updated by this pr) readme how to create the oauth2 client tokens. |
|
See here, everything which is green: https://github.com/vitalif/grive2/pull/242/files |
Thanks. I have already id and secret. For first sync it works. At the second I receive the error.
|
Ah, now i understand. Can you look into |
No, is not there. Only refresh_token is in that file. I mention that I am on entware linux distribution installed in Asus router. What I do not understand is that when Still searching. If I find the fix I will share it! |
@amplatfus What happened is that you are still on a version which does not have this PR. So the id and secret are not saved. So in the second call, you again have to use Only with this PR, the id and secret are saved during the |
So you suggest to use grive - -id... - -secret at all calls? Because the id and secret are not saved at the first call when.grive is created? |
@amplatfus IF you are on a currently released version (=this PR is not applied), then yes. Only when this PR is merged and released, you only need to specify it in the |
Thank you so much for the solution. |
I can't seem to get this to work. Similarly to amplatfus I get this Error:
This happens after I call the Also updated according to the steps described here : http://yourcmc.ru/wiki/Grive2#Updates my .grive is still only showing the refresh token. Thanks for your effort! |
Does it work with the old grive version? If not, too, then it seems I didn't get all steps to build a new google client token. :-( |
If you wanted to give a different than the default client id and secret, you always had to give that on the commandline. Now it's saved in the .give file. If given on the commandline, it's now also only used when 'auth/-a' is given, in normal runs it's not anymore valid (and errors out).
* Updated debhelper compat level to latest stable one
3bf6f81
to
d3c7591
Compare
Hi. I've just merged #294 which effectively does the same. So sorry for not merging your PR even though it's already a year old. :) |
This still has the readme explanations how to set the id during runtime. If they are the same it might make sense to pull these in |
Can we create other pull request with yours README changes. |
I have open pull request #297 with cherry-pick of your readme. Hope is fine for you @jankatins. |
This already in via #294 |
If you wanted to give a different than the default client id and secret, you always had to give that on the commandline. Now it's saved in the .give file. If given on the commandline, it's now also only used when 'auth/-a' is given, in normal runs it's not anymore valid (and errors out).
This is a workaround for #236 so you simply add your own client id and secret to get the sync going again.
This partly reverts #160 because it removes the possibility to set the client id and secret on the command line during a normal (not
-a
) run. I found that intuitive as the corresponding refresh token was saved to disc and so changing the id/secret (on the command line) was actually not possible as long as you do not change the refresh token. (That's at least my understanding here, cc: @cgltower, @kuschuermann)