Configuring OAuth 2 > G-Suite by Google
Note: This feature may not be available in your plan. Please contact your Advocacy Coach to learn more.
This article will cover how you can configure your OAuth 2 setup in the AdvocateHub to allow your Advocates to sign up for the hub using their Google G-Suite accounts. This provides your Advocates with a seamless, easy way to enter your hub using their Google accounts.
This article will cover:
Gather data from your Google API Console
First thing we need to do is gather our Client ID and Client Secret which you can find in your Google API Console. Once you navigate to your console, choose Credentials from the menu on the left-hand side.
You will be greeted with an opportunity to Create Credentials, from this dropdown select OAuth client ID
Next, we create the Client ID. Here, under Application type you need to select 'Web application'. You can Name it whatever you like, I have used 'Influitive AdvocateHub in this example. And finally you need to set your Authorized redirect URI, this will be your hub URL followed by '/users/auth/custom_oauth2/callback'. Click Create to save.
Now you will be presented with your Client ID and Client Secret which you will need to copy into your hub in our next steps
Finalize configuration in AdvocateHub
At this point we need to go back to your AdvocateHub and essentially just plug in some information that I will outline below. Find our OAuth integration under Integrations > Custom OAuth Provider and open the Setup tab, you should see a list of empty fields like this:
Let's fill out this information:
Client ID | Paste in the Client ID we retrieved from your Google API Console in the earlier steps |
Client Secret | Paste in the Client Secret we retrieved from your Google API Console in the earlier steps |
Endpoint | https://accounts.google.com |
Token URL | https://accounts.google.com/o/oauth2/token |
Authorize URL | https://accounts.google.com/o/oauth2/auth |
Fetch User Path | https://www.googleapis.com/oauth2/v1/userinfo?alt=json |
Scope | profile email |
Ignore OAuth2 State | Leave box unchecked |
UID Lookup | id |
Name Lookup | name |
Email Lookup | |
URL Lookup | Leave blank |
Image Lookup | picture |
Add final cosmetic touches
At this point everything should be functioning correctly but we can add a name and some logos which will make the experience look perfect. We need to be on the same page where we entered the information above. Scroll to the bottom of this page and under Misc. other stuff you will find a place to upload an image and a logo as well as a Display Name. There are many variations of the Google logo that you can use, you can either get these directly from Google or search for the images online.
If you have dual login enabled then the Advocate will see something like this when they navigate to the AdvocateHub.
If you have OAuth Single Sign On enabled you will skip the Influitive Sign In page altogether and be brought straight to a Google page where you can enter your Google credentials.