I’ve discovered the following stuff.
This kind of login is called internally Interim. It works thanks to the continuous polling offered by the Heartbeat API. The prefix of the expired session functionality is wp-auth-check and the important bit for me was a little script at /wp-includes/js/wp-auth-check.js.
When the auth check request is sent to the server, the response will contain a true if the session is active or a false if it has expired. Based on that, the script decides if it has to show the modal login or not. Given that all is managed by events, it is sufficient to trigger one like this
jQuery(document).trigger('heartbeat-tick.wp-auth-check', [ {'wp-auth-check': false} ])
to make the dialog box appear.
Related Posts:
- Preventing session timeout
- How reduce wordpress login session timeout time?
- Removing username from the ‘wordpress_logged_in’ cookie
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- How to pass users back and forth using session data?
- How to fake a WordPress login?
- Does wp_logout_url() destroy a session? (Logging out question)
- How do I extend auto logout on idle OR redirect inline popup
- How to get login data (session) outside WordPress?
- how to logout user on browser tab or window closes
- Custom Connect to Facebook, problem logging in/logging out
- How can I test the login for an expired session?
- How does WordPress handle sessions?
- WordPress as webapp login session
- Session Experies and Get Logged Out Within Few Minutes
- Share WordPress login info with other PHP app
- One time login on 2 different WordPress sites
- End session screen not close automatically after login
- wordpress login loop and session problem
- Get WordPress logged in username from root domain when WP is installed in a subfolder
- User not logged first time I open the homepage
- How to limit user to login only once per session
- Can I programmatically login a user without a password?
- How to login with email only no username?
- Woocommerce registration page [closed]
- Share login data/cookies between multiple installations
- How can I create a separate blog that is private?
- Email address or username used to login in wordpress
- How to customise wp-login.php only for users who are setting a password for the first time?
- wp_login action hook not working
- Make wordpress admin failed login attempt return 401
- Positioning the “Lost your password?” and “← Back to Site”
- Warning: Cannot modify header information – headers already sent
- Change to nofollow tag in wp-login.php
- Validate Custom Login field
- How can I allow access to two user accounts using one login?
- How to set different cookies for logged in admin users and logged in non admin users?
- How to shutdown wordpress login temporarily
- Where is the query and form in wp-login.php?
- How to edit .htaccess to change site’s login url?
- How do I force “users must be registered and logged in” on subsites?
- redirect to homepage after login
- Login redirects and query strings
- User Login System with File Delivery?
- Chrome 83 doesn’t connect WP login page after update from http to https on localhost
- WordPress login problem
- Forcing SSL login, have to log in again from WP/BP-Admin Bar
- Call header and footer on wordpress default login page
- Notifications when someone is on the site
- How can I prevent anyone from logging into a WordPress failover site?
- How to password-protect everything except the logo
- Login Redirect Error – $user->roles
- WordPress login security
- Why isn’t the login page rate limited by default?
- how can redirect sign in and sign out link front-end page rather then wp-login .php in comment form in wordpress
- Input sanitation
- Advice on redirect to lock site from unauthorized users
- Sending new registration meta values to admin by email
- Single Time Login HELP
- Allow Access to Home Page and Login Screen but Nothing Else (unless logged in)
- Error on WordPress Login
- Custom login page problem!
- Get WordPress login functions without printing anything
- Allow login only for one account from one device
- URL with login details included for public members
- woocommerce store login not working at first time
- Plugin or ways to limit number of users logging in the website,
- Restricting wordpress login sessions for a web app
- How is it possible to current user info on page in WordPress?
- Trouble when I try to connect to WordPress
- Custom failed login error messages for users based on user role?
- Set logged in user based on API response
- Can’t login to wordpress, got ERR_EMPTY_RESPONSE after a few minutes
- Create a login page which redirects to a specific page?
- wp_signon works localhost but not wokrs https site
- how to add social login option in wordpress
- Allow log in to the dashboard only from specific gadget?
- Why deleting/removing cookies in WordPress does not log me out from admin?
- Avoiding accidentally creating a second account at “Or log in with your existing social profile”
- Can we start session from another php site to wordpress blog site?
- display last login date in the frontend
- How user should automatically activated and go for login?
- How to lock WordPress front-end with login and password?
- Site is not loading after relogin attempts on SSL
- Log in to wordpress after executing another form function
- Disabling the login form and redirect users on logout without headers sent php warning
- WordPress keeps redirecting to an unsecure connection?
- A way to redirect users when they log in based on their current page
- Webpage not found upon entering wrong username and password on custom login form?
- changing WordPress login page
- Where do I find “log in” and “register” link which are located on the top right corner?
- Check to see if there a wordpress user account and create one if not outside of wordpress
- WordPress Login Box horizontal at the top.
- Cannot login with correct username and password anymore
- How to make WordPress keep me signed in? [duplicate]
- how to add custom word press regisration form in word press 3.5 with out module [closed]
- Warning-session start errors and cannot login to administer
- make a login system for site visitors
- Entire WordPress content disappears
- Remove login link from Reset Password-screen