OAuth
Instructions on how to install and use the Gmail Connector.
Gmail is an email service use to communicate. By adding the Gmail connector, developers will be able index emails into Ocular and make them searchable.
This approach will explore how an individual can connect to Gmail using OAuth.
Obtaining Gmail Secrets
-
Navigate to Google Cloud Console to create a Google Cloud Project.
-
Add the Gmail Api to your Cloud Project.
- Click on API & Services and then Enable API Services.
- Click on +Enable Api Services
- Search for Gmail API and click Enable.
-
Create OAuth Credentials For Gmail.
- Click on Configure OAuth screen then follow instructions.
- Click on Credentials to Generate Client Id and Client Secret.
- Create the Client Id and Client Secret and add URI as
http://localhost:3001
and the redirect URIhttp://localhost:3001/dashboard/marketplace/gmail
.
Enviroment Variables
Add CLIENT_ID
and CLIENT_SECRET
variable to env.local
if you are running Ocular fully in Docker or env.dev
if you running Ocular in Dev mode.
Installing the Gmail Connector
To install a connector in your backend, add the connector to the Ocular config file in your backend.
The following config files are currenlty supported
core-config-local.js
- for running Ocular in Docker.core-config-dev.js
- for running Ocular in development mode.
Set the following in the core-config-xxx.js
apps section.