Support » Plugin: Nextend Social Login and Register » Is it possible to create a button: Switch Google account?

  • Resolved the1first

    (@the1first)


    I use my site by logging in with a Google, and I want to give the user the option to switch to another Google account without do logout, is this possible?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Laszlo

    (@laszloszalvak)

    Hi @the1first

    Sorry, I am not really sure what are your ultimate goals.

    Do you mean linking the current WordPress account to another Google account?
    If you do, then for logged in users we display rather the link/unlink buttons, that can be used for linking/unlinking a social media account to the current WordPress account.
    By default we display the link/unlink buttons on the WordPress default “Edit Profile” page of the user. But you can display anywhere on your site with a shortcode like this:
    [nextend_social_login link="1" unlink="1"]
    This way if people have a Google account linked to the currently used WordPress account, then they could unlink it, and they could link another one. So next time when the person uses that social media account, they would be able to login the linked WordPress account.

    Or if you rather meant displaying the Google buttons, while the user is still logged in and with that Google button you want the person to login to another WordPress account?
    If this is what you are trying to achieve then I am sorry, but that is not possible, since as I mentioned above, for logged in users we rather have link/unlink actions.
    So the person needs to logout first.
    With some custom coding you could probably achieve your goals, if you programmatically destroy the current user session and then you redirect the user to our endpoint. However please note that, we can not provide support for custom coding.

    Best regards,
    Laszlo.

    Thread Starter the1first

    (@the1first)

    thanks for the detailed answer,
    I meant something else.
    After a user has connected to WP using Google, and now he wants to connect to WP from another Google account that he has, can he get the list of his Google accounts again using a button and choose another google account?

    Plugin Support Ramona

    (@nextend_ramona)

    Hi @the1first

    Do you mean you want the “Choose an account” popup to appear again?
    https://imgur.com/tfoGLPp

    You should go to the Google provider’s settings and enable the “Select account on each login” option to achieve that:
    https://nextendweb.com/nextend-social-login-docs/provider-google/#settings

    After the visitor logs in, they’ll be asked to choose the Google account they want to use the next time they log in.

    Thread Starter the1first

    (@the1first)

    I mean after he is already logged in he can see this window https://imgur.com/tfoGLPp again to select another account

    Plugin Support Ramona

    (@nextend_ramona)

    One WordPress user can only have one social account connected to each provider.

    So the only way for people to see the “choose an account” window again is either:
    1. logging out and logging back (This will result logging into another WordPress account.)
    2. while logged in, first unlinking their current social account and linking a new one (as Laszlo explained in the first part of his reply.) However, in this case they will no longer be able to use the “first” social account to log in. Only the new social account will work as that is connected to their WordPress user.

    Thread Starter the1first

    (@the1first)

    no no no.
    The user wants to sign in with another Google account (he has 2 google accounts and 2 WP link account). Can he switch between accounts? Quite a simple question to be honest.

    Plugin Support Ramona

    (@nextend_ramona)

    They can do that, but they must log out first and log in with their other account. The same way as they switch between two regular WordPress accounts. (As Nextend Social Login creates regular WordPress accounts, just the people don’t need to remember usernames and password to access it.)

    Thread Starter the1first

    (@the1first)

    That’s exactly what I initially asked…
    Is it possible to do it without logout?

    Plugin Support Ramona

    (@nextend_ramona)

    No.

    You can only log in to one WordPress account at a time. So without logging out from the one you’re logged in currently you can’t log into another one.

    Thread Starter the1first

    (@the1first)

    interesting.
    It is quite easy to develop a popup of Google accounts, and by clicking on another account, it will log out of the connected account and connect to the other account.

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.