Zerowallet
  • What is Zerowallet
  • Why we built Zerowallet
  • How does Zerowallet work?
  • 🔧Installation
    • Setting up a gas tank
    • Setting up Postgres
    • Setting up Google Drive Recovery
  • Recovery
  • Running the docker service
  • Setting up the HTTPS server
  • Configuring the YAML file
  • Installing frontend NPM packages
  • 🤝Contribution
  • Open source
  • Grants
Powered by GitBook
On this page
  • Create a Google Cloud Project
  • Enable Google Drive API
  • Enable OAuth Consent Screen
  • Client ID Credentials
  1. Installation

Setting up Google Drive Recovery

Here we demonstrate the steps for achieving Google Drive Recovery

PreviousSetting up PostgresNextRecovery

Last updated 2 years ago

If you are not familiar with this type of recovery or Zerowallet recovery at all, please learn moreRecovery.

Create a Google Cloud Project

Go to and log into your Google account. Now create a new project on the cloud. Add the project name and the name of your organization. Then select the newly created project.

Enable Google Drive API

This step allows the cloud project to utilize the Google Drive API so it can add new files and folders to the user's Drive. Navigate to the Dashboard after selecting the newly created project. Search for the Google Drive API and enable it.

Enable OAuth Consent Screen

The Zerowallet relies on Google OAuth 2.0 for authorization. This step is for showing users consent screens when they are setting up or initiating Google Recovery.

  • Search and Go to OAuth Consent Screen. Choose the user type (internal or external) according to your needs. Add the details such as the app name, support email, domain, etc.

  • Click 'save and continue' and go to the next page. Now you need to pick the scopes of the project. Click 'Add or remove scopes' then search for Google Drive API in the scopes. Select the scope: ./auth/drive.file with the description: See, edit, create, and delete only the specific Google Drive files you use with this app.

  • Click 'save and continue' and go to the next page. Next you need to add the test users for your application.

  • Click 'save and continue' and go to the next page. Review the summary of the application in the last page.

Client ID Credentials

Go to Credential from the left sidebar. Click "Create credentials", then choose OAuth Client ID from the drop-down. Choose the application type according to your needs whether it be web or Android app, etc. Add the Authorized JavaScript origins and Authorized redirect URIs (in case of web app). If you're testing a Next JS project, for example, is the default URI.

const googleRecoveryOption: RecoveryConfig = {
    type: 'google-web-recovery',
    googleClientId: process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID!,
    allowMultiKeys: false,
    handleExistingKey: 'Overwrite'
};

After saving, copy your Client ID and use it when using the package. To set the options of the Google recovery below is an example retrieved from

🔧
https://console.cloud.google.com/
http://localhost:3000
https://github.com/questbook/zero-wallet-wagmi-connector/tree/main/example