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

Extends support application id and secret support #294

Merged
merged 1 commit into from
Dec 15, 2019

Conversation

AmonRaNet
Copy link

@AmonRaNet AmonRaNet commented Dec 13, 2019

With this pull request grive2 will have more advanced support of the custom client id and secret.

  • cmake: projects supports custom id's during cmake config (see README)
  • client id and secret always saved in .grive config file after grive -a
  • new CLI option added grive -a --print-url which will return generated url for token request

Small changes:

  • cmake: GRIVE_VERSION is cached and can be overwritten during cmake config

@AmonRaNet AmonRaNet mentioned this pull request Dec 13, 2019
@AmonRaNet
Copy link
Author

Probably repeats partially #242

- persistent id's in config
- cmake supports id's during config
- priority: default(cmake), config, cli
@vitalif
Copy link
Owner

vitalif commented Dec 15, 2019

Thanks, merged

@AmonRaNet AmonRaNet deleted the extend-custom-app-id-secret branch December 16, 2019 20:28
@Caballerog
Copy link

I've created my id and secret using google's console and compile the last commit but when I put my "key" from the Google's page, I've the following error (console):

Please input the authentication code here:
<CODE FROM Google's signin page>

Failed to obtain auth token: HTTP 400, body:
exception: /home/carlos/.cache/yay/grive-git/src/grive-git/libgrive/src/protocol/OAuth2.cc(80): Throw in function void gr::OAuth2::Auth(const string&)
Dynamic exception type: boost::wrapexceptgr::OAuth2::AuthFailed
[gr::expt::BacktraceTag*] = #0 0x556807d1d6bc grive gr::Exception::Exception()
#1 0x556807d1282a grive gr::OAuth2::AuthFailed::AuthFailed()
#2 0x556807d11c56 grive gr::OAuth2::Auth(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
#3 0x556807cc2b87 grive Main(int, char**)
#4 0x556807cc04e9 grive main
#5 0x7fdea143d153 /usr/lib/libc.so.6 __libc_start_main
#6 0x556807cc101e grive _start

@AmonRaNet
Copy link
Author

I've created my id and secret using google's console and compile the last commit but when I put my "key" from the Google's page, I've the following error (console):

Please input the authentication code here:
<CODE FROM Google's signin page>

Failed to obtain auth token: HTTP 400, body:
exception: /home/carlos/.cache/yay/grive-git/src/grive-git/libgrive/src/protocol/OAuth2.cc(80): Throw in function void gr::OAuth2::Auth(const string&)
Dynamic exception type: boost::wrapexceptgr::OAuth2::AuthFailed
[gr::expt::BacktraceTag*] = #0 0x556807d1d6bc grive gr::Exception::Exception()
#1 0x556807d1282a grive gr::OAuth2::AuthFailed::AuthFailed()
#2 0x556807d11c56 grive gr::OAuth2::Auth(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
#3 0x556807cc2b87 grive Main(int, char**)
#4 0x556807cc04e9 grive main
#5 0x7fdea143d153 /usr/lib/libc.so.6 __libc_start_main
#6 0x556807cc101e grive _start

I found interesting fact: grive not refreshing config ".grive" file when you try to auth in same folder again. If you trying to use same gdrive folder for sync - first delete old .grive, then run grive -a.

Other aspect it is google account themselves. Please check Google API enabled, access rights.given.

@hyoje42
Copy link

hyoje42 commented Jan 2, 2020

I've created my id and secret using google's console and compile the last commit but when I put my "key" from the Google's page, I've the following error (console):
Please input the authentication code here:
<CODE FROM Google's signin page>
Failed to obtain auth token: HTTP 400, body:
exception: /home/carlos/.cache/yay/grive-git/src/grive-git/libgrive/src/protocol/OAuth2.cc(80): Throw in function void gr::OAuth2::Auth(const string&)
Dynamic exception type: boost::wrapexceptgr::OAuth2::AuthFailed
[gr::expt::BacktraceTag*] = #0 0x556807d1d6bc grive gr::Exception::Exception()
#1 0x556807d1282a grive gr::OAuth2::AuthFailed::AuthFailed()
#2 0x556807d11c56 grive gr::OAuth2::Auth(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)
#3 0x556807cc2b87 grive Main(int, char**)
#4 0x556807cc04e9 grive main
#5 0x7fdea143d153 /usr/lib/libc.so.6 __libc_start_main
#6 0x556807cc101e grive _start

I found interesting fact: grive not refreshing config ".grive" file when you try to auth in same folder again. If you trying to use same gdrive folder for sync - first delete old .grive, then run grive -a.

Other aspect it is google account themselves. Please check Google API enabled, access rights.given.

Wow. It really works for me! Thanks!!!!

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.

4 participants