Google OAuth

IMPORTANT: In most cases it is better to use SimpleSAML for Google authentication. As of version 10.0 this plugin has been removed.

Before you can use the google_oauth plugin you will need to create a Google API Console project. To create it, follow these steps:

  1. Download the Google APIs Client Library for PHP to /lib/google_api_php_client_2.2.0
  2. Go to Google API Console.
  3. From the project drop-down, select an existing project, or create a new one by selecting Create a new project.
  4. In the sidebar under "API Manager", select Credentials, then select the OAuth consent screen tab.
    • Choose an Email Address, specify a Product Name, and press Save.
  5. In the Credentials tab, select the New credentials drop-down list, and choose OAuth client ID.
  6. Under Application type, select Web application. Register the origins from which your app is allowed to access the Google APIs, as follows. An origin is a unique combination of protocol, hostname, and port.
    • In the Authorized JavaScript origins field, enter the origin for your app. You can enter multiple origins to allow for your app to run on different protocols, domains, or subdomains. You cannot use wildcards. Please use the base URL of your ResourceSpace (Note: do not use a sub level like even if your baseurl is set up to have one).
    • The Authorized redirect URI should be the one you see on the setup page of the plugin.
    • Press the Create button.
  7. From the resulting OAuth client dialog box, copy the Client ID and Client Secret. The Client ID lets your app access enabled Google APIs.