Troubleshooting

In the Add Google File dialog box, I just get the Google Error “Forbidden”

First, are you sure you followed all configuration instructions of the Google Apps Login plugin, including enabling Drive API…?

Google Apps’ user and permissions systems are complex, and there are many ways you could unintentionally forbid your users from using the Drive API.

You could have disabled API access completely, so take a look in your Google Apps admin panel and look for anything obvious.

One reason a lot have people have seen ‘forbidden’ in the past is because they have the following setting unchecked: go to Google Apps -> Drive, and then General Settings -> Allow users to install Google Drive apps.

After changing settings, you should logout of WordPress and Google, then refresh and try all over again.


In the Add Google File dialog box, I just see “Loading…”

If the plugin configuration is correct, most likely your site has opened another browser window in which it needs you to login to your Google account or confirm you grant permissions for the site to access your Drive account. So the first step is to double-check for that second browser window and follow the instructions there.

Otherwise, there may be a plugin configuration issue or a Javascript conflict.

Open your browser’s Developer Tools. If the Console tab has any red error messages, this may indicate a Javascript problem on your site – possibly from another plugin/theme, but which prevents any further Javascript from running (including the Add Google File dialog). You could try deactivating all other plugins and switching to a default theme to see if that helps track down the culprit. If in doubt, please contact support or try out the following possibility.

With your browser’s Developer Tools already open, reload the page and click the Network tab. Are there any red lines that refer to google.com? If so, you may be able to click into the Preview section of the red line to obtain an error message returned from Google. Most likely, the message will refer to an ‘invalid origin’. If you can’t obtain a message, please proceed anyway.

To fix this, you need to go back to the project you created in Google Developers Console when you first set up the plugin.

Under APIs & Auth (from the top-left three-bars menu), click the Credentials tab, then click into the OAuth 2.0 ID that you would have created. Inside, there is an Authorized Javascript Origin setting. You need to update this or add further URLs to match every possible URL for accessing your site – including http and https versions of your site URL, and also with/without the www at the front if it is possible to access with and without (although we would recommend choosing a canonical URL and have all others redirect to that URL).

In all cases, please just get in touch if you prefer for our support team to take a look, ideally providing an account on your site registered to contact@wp-glogin.com that will have permissions to ‘Add Google File’ in a new page/post.


Most users cannot see my embedded file

The Google viewer needs to have permission to show the file to whichever Google user is logged into the browser. The easiest way to ensure this is the case – and so even users who are logged out of Google can see the file – is to locate the file in Google Drive and click Share. Change to ‘Anyone with the link can view’ to be sure all users can see the file.


I don’t want users to need their own Google account to view folders – they keep being asked to authorize

(Enterprise version of Google Drive Embedder)

See our tutorial here for ensuring users do not need their own Google account to view files and folders.


I don’t want users to grant Drive access at login

By default, when you install the Google Drive Embedder plugin, whenever users ‘Login with Google’ to the site they will be asked to grant Drive and Calendar permissions.

You may not want this, especially if most users won’t need to interact with the Drive plugin.

It is possible to remove these at the login stage by adding this code to your own plugin or your Theme’s functions.php file:

function dd_my_gather_scopes($scopes) {
   return preg_grep( "/drive|calendar/", $scopes, PREG_GREP_INVERT );
}

add_filter('gal_gather_scopes', 'dd_my_gather_scopes', 20, 1);
Google Apps Login is trusted by thousands of organizations from small businesses to NASDAQ-listed companies and government organizations.

Users click their way through Login via Google (just one click after the first time)

Users click their way through Login via Google (just one click after the first time)


You can try it out by clicking below to auto-create a test account on this site! This will show you the basic Google login process.
Try out Google login

Logging in is only the start – Google Apps Login takes care of all your WordPress user management. Find out more here.

×