Skip Navigation

[Resolved] Adding social login to login form

This support ticket is created 3 years, 12 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 3 years, 12 months ago.

Assisted by: Minesh.

Author
Posts
#1969093

Dear Sir/Madam,

I installed the plugins "Log in with Google" hidden link, I assume it is added to the standard WordPress login form by a hook. When I use the toolset wpv-login-form, I lost the google login

May I know whether Toolset can work with social login? How can I do that?

Best regards,

Kelvin.

#1970495

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked the plugin you shared and I when I checked the plugin file:
=> plugin\login-with-google.1.0.10\login-with-google\inc\classes\class-plugin.php

I see the following function:

protected function _setup_hooks() {

		/**
		 * Actions
		 */
		add_action( 'login_enqueue_scripts', [ $this, 'login_enqueue_scripts' ] );
		add_action( 'login_form', [ $this, 'add_google_login_button' ] );
		add_action( 'register_form', [ $this, 'add_google_login_button' ] );

	}

The above function is set to add the Google login button with login_form and regiser_form hooks.

whereas Toolset uses the hooks:
- login_form_top
- login_form_middle
- login_form_bottom

So, that is why its not adding the google login button when you add login form using the shortcode: [wpv-login-form]
=> https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-login-form

If you want that Google Login button should be added when you are using Toolset [wpv-login-form], please ask your plugin author to hook in the above mentioned hooks i.e. (login_form_top, login_form_middle, login_form_middle)

#1971613

Dear Minesh,

I have not idea whether the google login plugins not follow the WP hooks or Toolset doesn't, if google login call the hook login_form and toolset call the login_form_xxx, there are no conflict to each other, why it doesn't work?

Best regards,

Kelvin.

#1971693

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I'm afraid that we do not have any official integration with the plugin "Log in with Google".

I already passed the required information that how Toolset Login form is generated using what hook and that should help the plugin Dev where to look at and nothing much I can do here.

As per our support policy we are not allowed to debug third party plugin code or make amendments there. I hope this is understandable.

If you adjust the shared plugin method that I had shared with my previous reply:
- https://toolset.com/forums/topic/adding-social-login-to-login-form/#post-1970495

And try to add the following hook to that:

add_action( 'login_form_top', [ $this, 'add_google_login_button' ] );

It should work but again as said, there is no official integration and if you add it above line of code and update the plugin "Log in with Google" the code will be overridden and due to that you will lost the changes you made. I shared all required information I had nothing much more we can do in this case.