1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-07-08 04:52:57 +00:00

Update Google drive setup

Ozzieisaacs 2019-11-26 10:12:57 +01:00
parent b38d496133
commit 1f843014a1
11 changed files with 43 additions and 23 deletions

@ -58,60 +58,80 @@ Calibre Calibre library (metadata.db) can be located on a Google Drive. Addition
To use google drive integration, you have to use the google developer console to create a new app. https://console.developers.google.com.
1. After login create a project:
![Dashboard](images/gdrive/dashboard.png)
2. Choose a name and save the project:
![Create project](images/gdrive/create_project.png)
3. Activate the API for the created project by clicking on enable APIs and services or API library
![Activate API](images/gdrive/activate_api.png)
4. Choose Google Drive API from the listed Apps
![API Library](images/gdrive/library.png)
5. Enable the Google Drive API by clicking on enable
![Enable Gdrive](images/gdrive/gdrive_enable.png)
6. Create credentials for the API
![API enabled Dashboard](images/gdrive/api_enabled_dashboard.png)
6. Click on Configure consent screen:
7. Click on create credentials in the following screen:
![API enabled Dashboard](images/gdrive/create_credentials.png)
8. First you need to enter a domain (this is the adress, if you want to access your server from the internet) for the gdrive callbacks:
![Domain verification](images/gdrive/verify_domain.png)
9. Optional:If you want to use the "watch metadata.db function" you have to verify your domain with google. In this case, please press the search console link first, finish this procedure and enter the domain in this popup afterwards and save
9. Otherwise please enter your domain name and click on enter
![Domain verification](images/gdrive/domain_verify_screen.png)
10. Go to the Credentials tab and choose OAuth Client ID
![credentials](images/gdrive/credentials.png)
11. Click on Configure consent screen:
![Configure Consent screen](images/gdrive/consent_screen.png)
12. Enter\
8. Enter\
your e-mail adress,\
the applications name,\
the domain you entered in the verify domain section\
the domain name of your application \
and add scope for '../auth/drive':
![Setup Credentials](images/gdrive/setup_credentials_oauth.png)
13. Choose the app type: Web-application, enter in the field 'Authorized redirect URIs' the complete domain adress with the callback path: CALIBRE_WEB_URL/gdrive/callback\
Save your changes.
8. Click on create credentials in the following screen:
Choose OAuth Client ID from the selection.
![API enabled Dashboard](images/gdrive/create_credentials.png)
9. Choose the app type: Web-application, enter in the field 'Authorized redirect URIs' the complete domain adress with the callback path: CALIBRE_WEB_URL/gdrive/callback\
E.g.: For a https connection to example.com where Calibre-Web is located in the folder 'test' you have to enter:
https://example.com/test/gdrive/callback
The address has to be public, localhost, http://internalServername or similar wont work. The field can't be empty.
![Web application](images/gdrive/web_app.png)
14. Google is now presenting your client ID and your client secret. We just close the popup, we download the informations.
10. Google is now presenting your client ID and your client secret. We just close the popup, we download the informations.
![Setup Finished](images/gdrive/setup_finished.png)
15. Now we download the informations in json format by clicking on the download button on the overview page
11. Now we download the informations in json format by clicking on the download button on the overview page
![Download credentials](images/gdrive/finished_overview.png)
16. Download json file and place it in `calibre-web` directory, with the name `client_secrets.json`
12. Download json file and place it in `calibre-web` directory, with the name `client_secrets.json`
13. Final step is the verification of your domain.
![Download credentials](images/gdrive/domain_verification_start.png)
14. First you need to add your domain (this is the adress, if you want to access your server from the internet) to the **google search console**:
![Domain verification](images/gdrive/verify_domain.png)
15. Please follow the steps there for verifiying the domain address
The one one the right is the easiest for self hosted domains.
After entering your domain name, download the html file and make it accessible under the address http[s]://[your-domain-name]/[filename]
16. Afterwards you can enter your domain to the screen from step 14 and activate your domain
![Domain verification](images/gdrive/domain_verified.png)
The Drive API should now be setup and ready to use, so we need to integrate it into Calibre-Web. This is done as described below:\

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 39 KiB