blockvis / civic-sip-wp

Civic SIP WordPress plugin
GNU General Public License v2.0
6 stars 2 forks source link

Can't stay logged in #3

Closed pjv closed 7 years ago

pjv commented 7 years ago

The login cookie that the plugin creates always expires with the session. The normal WP login has a "keep me logged in" checkbox that writes a cookie that expires in two weeks. Even if you check that box before executing the Civic login, it still writes a session cookie.

It would be good if the plugin could respect the "keep me logged in" checkbox.

cheelahim commented 7 years ago

Hey @pjv . This is one less straightforward. Since developers are free to put the short-code wherever they want, the users are not necessarily logging in from 'wp-login' page, hence might not see this checkbox. We need to investigate this to come up with consistent solution.

pjv commented 7 years ago

Hi @cheelahim - yeah, i see the issue. I don't think this is really a big deal, but it would be nice to be able to support the standard "remember me" functionality.

Here's the code around the "remember me" checkbox in the standard WP login form:

2017-10-22 at 10 48 am

What if you modified the Civic shortcode to output a similar checkbox with the same name/id rememberme and then modify the code that processes a click on the Civic login button (either on the standard login page or on another page via the shortcode) so that it takes the value of that checkbox input into account?

cheelahim commented 7 years ago

@pjv I agree it is a nice to have feature but we should avoid breaking changes too. Rendering new elements with current short-code could break existing installations. We will check how other vendors (if any) deal with this functionality in their auth plugins.

Zorato commented 7 years ago

Added support of remember me flag from sign in form at wp-login.php in 4b95db3. Fix is going to be delivered with 1.1.2 release.