• Docs
  • Pricing
  • Support
  • Blog
  • Login

›Intro

Intro

  • What's OneGraph?
  • How does it work?
  • Creating your first app
  • Making your first query
  • OneGraphiQL
  • Authentication & Security Overview
  • Custom Google Auth

On the frontend

  • Using with Apollo
  • Log in to services
  • Example with create-react-app

External Authentication

  • What are JWTs?
  • AuthGuardian
  • Securing your Apollo server
  • Securing your Hasura API
  • Securing your Netlify site
  • Securing your express.js app
  • Advanced JWT customization with webhooks

Subscriptions

  • Subscriptions
  • Webhook-based subscriptions
  • Websocket-based subscriptions
  • Salesforce subscriptions
  • GitHub subscriptions
  • Gmail Subscriptions

Advanced

  • Persisted Queries
  • Mailchimp Signup with Persisted Queries

Custom OAuth client for Google services

To use Google services like Gmail, YouTube, Google Calendar, and Google Docs with OneGraph, we require that you create a custom OAuth client.

First, create or update your consent screen on the Google Cloud Platform console.

Consent screen

Make sure that onegraph.com is set as an authorized domain.

Authorized domain

Go to the Credentials page to create a new OAuth client.

Setup OAuth Client

Choose "Web application" as the "Application type" and add the following Authorized redirect URIs, depending on the services that you want to use. You can leave the "Authorized JavaScript origins" field blank.

ServiceRedirect URI
Gmailhttps://serve.onegraph.com/oauth/gmail/receive
Google Analyticshttps://serve.onegraph.com/oauth/google-analytics/receive
Google Calendarhttps://serve.onegraph.com/oauth/google-calendar/receive
Google Docs/Drivehttps://serve.onegraph.com/oauth/google-docs/receive
Google Search Consolehttps://serve.onegraph.com/oauth/google-search-console/receive
Google Translatehttps://serve.onegraph.com/oauth/google-translate/receive
YouTubehttps://serve.onegraph.com/oauth/youtube/receive

Create Client

Copy your client id and client secret.

Client ID and Client Secret

Enter them on the OneGraph dashboard for your app under Auth Services > Custom OAuth.

OneGraph Dashboard

Now you and your users can log in with your custom Google Client.

If you would help getting your Google app verified, please email support@onegraph.com.

← Authentication & Security OverviewUsing with Apollo →
Links
OneGraph Overview Example projectsOneGraphiQL Explorer
Support
Live chat on Spectrum> TwitterBlog
More
Terms of ServicePrivacy Policy
Copyright © 2021 OneGraph