OAuth Authenticator (Google , Facebook, Etc.)
Configuring OAuth for EnterMedia
There are a few steps that need to be taken to enable an EnterMedia site to integrate with an OAuth provider. This includes:
- Setting up a client ID
- Setting up a client secret
- Setting up approved redirect locations on the OAuth server
For Google SSO:
You need to setup credentials within the Google Developers Console: https://console.developers.google.com Information on how to do this is available on the Google Developers site: https://developers.google.com/identity/protocols/OAuth2 In your Google APIs Console create a new OAuth ClientId for a web application.
You will need to add: http://yoursite.com/emshare/authentication/oauth/googleauth.html and http://yoursite.com/emshare/views/settings/google/connectfinish.html to the list of Authorized Redirect URLs. Once you’ve completed these steps, you need to configure OAuth within EnterMedia.
Use the data manager (Settings | Database) and find the oauthprovider table. Choose the “google” record, add your client ID and secret and select the enabled box. Also make sure to check off the Auto Create New Users checkbox and to assign a Role to new users.
If everything is configured correctly, you will be able to login to the app using the the “sign in with google” button link that will appear on the login page.
Another way to connect your DAM to a Google account is go to Settings | Server,
Hit the (3)Connect to Google button and finally hit the (4)Connect Google Drive and Admin button.
The steps are similar. You need to configure the drupal module and get the client ID and client secret. You also need to specify the remote URL of the drupal server in this case, as we cannot determine this automatically.