Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Heateor Support

    (@heateor)

    Super Socializer does not create any extra cookie. It uses the cookie created by WordPress on login for authentication. You would like to check WordPress documentation to increase expiry time of cookie.

    Thread Starter hkchakladar

    (@hkchakladar)

    Yes, I knows, cookies are created by WordPress, so whenever I log in by default username/password, I see my cookies is set to default 14 days expiration date.

    When logged in by Social, it set to expire at the closing of browser.

    Somehow, WordPress is not setting the cookies correctly, while loggin via social. Can you check it please ?

    Plugin Author Heateor Support

    (@heateor)

    We checked logging in using default login form and Social Login. In both cases, authentication cookie expired after closing the browser.
    May be you have done some customization regarding cookie expiration in your WordPress installation or this is specific to the theme you are using.

    Thread Starter hkchakladar

    (@hkchakladar)

    So, WordPress by default remember authentication cookies till browser is closed.

    BUT it gives you the option to check Remember me and it will remember you for 14 days.

    Check this, on this site it-self.

    img: https://i.imgur.com/dHGyPM4.png

    So, I have this <input> field hidden in my theme and all user, by default login are remembered for 14 days.

    And I want to make the same remember me option works for the social login as well. Every other site, do the same.

    Possible work arround may be insert the <input> field, when sending data for authentication ?? Does anything exist like this ?

    Plugin Author Heateor Support

    (@heateor)

    You can use following function in functions.php file of your theme to remember the Social Login for 14 days:

    function heateor_ss_set_cookie ( $user_login ) {
    	$user = get_user_by( 'login', $user_login );
    	if ( ! empty( $user -> data -> ID ) ) {
    		wp_set_auth_cookie( $user -> data -> ID, true );
    	}
    }
    add_action( 'wp_login', 'heateor_ss_set_cookie', 10, 1 );

    Team, thanks a lot. It helped me to login my users for a long period.

    Plugin Author Heateor Support

    (@heateor)

    @atonyk,
    Great. You’re welcome.

    hi,
    I have a doubt regarding the ‘wp_set_auth_cookie’, the wp_set_auth_cookie kep the cookie two days without setting second parameter (remember ) true, i need to use the ‘wp_set_auth_cookie’ for user auto login on signup and when user closed the browser without logout after signup into the website, the cookie still kept there in two days, so some other users use the same machine the the site will auto login, may i correct ? then how to fix this issue ?
    https://codex.www.ads-software.com/Function_Reference/wp_set_auth_cookie

    Plugin Author Heateor Support

    (@heateor)

    Hi @subair.tc,

    You can use the code posted above to keep Social Login users logged in for 14 days.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Logged in session is closed, while closing browser’ is closed to new replies.