OAuth Social Networks

Google

Go to https://console.developers.google.com and create a new project:

Google: Create project

Set a name, a logo, and your authorized domains:

Google: OAuth consent screen 1
Google: OAuth consent screen 2

Create your OAuth client ID: choose Web application and specify your Authorised redirect URIs. You can specify URIs from your local server or online test server protected by a password:

Google: Create OAuth client ID

Get your google client ID and your secret:

Google: OAuth client ID and secret

Edit the file /config/config.inc.php to fill these Google values


$config['GoogleRedirectURI'] does not have to be modified unless you want to change the folder containing the oauth files for security reasons.

If not already done, you should also add a property to your domain from here: https://www.google.com/webmasters/verification/home.
When you added a property to your domain, back to https://console.developers.google.com to add it in Domain verification:

Google: OAuth domain verification

To update your Authorised redirect URIs, go to Credentials and click on the Credential you want to update:

Google: OAuth domain verification

Facebook

Go to https://developers.facebook.com and create an App:

Facebook: Create an App

Select the product Facebook Login:

Facebook: Select product Facebook Login

At Quickstart, select Web platform:

Facebook: Quickstart select platform

Quickstart: set your Site URL, then go directly to step 5 to exit the Quickstart:

Facebook: Quickstart select platform

Go to Settings / Basic to set your App domain and links to Privacy Policy and Terms of Service. These links are important, they will be checked by Facebook:

Facebook: Settings / Basic

On this page you have you App ID and your App Secret, edit the file /config/config.inc.php to fill these Facebook values:


$config['FacebookRedirectURL'] and $config['FacebookRequiredScope'] do not have to be modified unless you want to change the folder containing the oauth files for security reasons or want to get more specific infos from Facebook users.

For each new Facebook app, you will have to verify your individual or business Status:

Facebook: Verify your status

Go to Facebook Login / Settings and set your Valid OAuth Redirect URIs. All options should be set like on this screenshot:

Facebook: Facebook Login / Settings

Switch to Live Mode on the top right:

Facebook: Switch to Live Mode

If you get errors on URIs, check also your App ID and App secret, sometimes bad values on ID or secret returns errors about URIs.

Facebook: URIs error