If you use the Theme My Login plugin (TML) to create a custom styled login page on your site, please be aware that since TML adjusts the way the login process works in WordPress, plugins like Google Apps Login that are expecting WordPress standards may not work.
An approach that will not disturb WordPress’ standard login mechanism so much would be to use a plugin that styles the existing wp-login.php page instead of creating a new login page, but of course this might involve more work to achieve something that matches your Theme. Our recommended plugin for this approach is Admin Custom Login, and this is directly compatible with Google Apps Login.
If you would like to attempt to get TML to work on your site, here are the suggested steps:
1. Specify both Authorized Redirect URIs in the Google Developers Console Project when you configure Google Apps Login:
http://www.website.com/wp-login.php
http://www.website.com/login
http://www.website.com/login/
Above, I’ve added two versions of the /login URL just in case. You would add these under API’s & Services -> Credentials -> OAuth 2.0 IDs. Click into the ‘web application’ ID you set up when you first configured the plugin.
2. Add the below code in functions.php in the Child theme or similar – of course change for your site’s wp-login.php URL:
function my_gal_login_url($login_url) { return 'http://website.com/wp-login.php'; } add_filter('gal_login_url', 'my_gal_login_url', 10, 1);
The above steps may be enough, but if the ‘Login with google’ button doesn’t appear on the login form try step 3 below only (not step 4). If it appears but you sometimes get ‘session mismatch’ errors, please try both steps 3 and 4.
3. Add this link URL as ‘Login with Google’ on the TML login page (below theme_my_login shortcode):
http://website.com/wp-login.php?gaautologin=true
4. Hide the original ‘Login with Google’ button in Child theme CSS:
p.galogin, h3.galogin-or { display:none; }
Some users have found that ‘Login with Google’ just returns them to the wp-login.php page with no error message showing, but actually if they then visit /wp-admin/ they find they were actually logged in (just not redirected to the dashboard as expected). If this happens to you, follow step 5:
5. In TML settings, uncheck ‘Enable custom redirection’ and maybe some other security settings.
If you would like any help, or want to report your own findings, please contact support.
Of course if you aren’t in a position to get your hands dirty with the detailed configuration required, the short answer is that I don’t think TML works alongside Google Apps Login straight out of the box!