On this page
What this issue is
A session is how a website remembers who you are between page loads. It is usually a cookie holding a session ID or a signed token. Each session has a lifetime. When the lifetime ends, the site treats the visitor as logged out.
Session expires mid-onboarding means that lifetime ends while a new user is still setting up their account. Typical causes are an idle timeout set to a few minutes, a short-lived auth token with no refresh, a CSRF (cross-site request forgery) token that expires before the form is submitted, or a verification step in another tab or app that creates a second session and invalidates the first.
Why it costs you leads or sales
Onboarding is where a signup turns into an active user. If someone has filled in company details, invited teammates or connected an integration and then gets logged out, they have to redo the work or they give up. New users have the least patience and no loyalty yet.
The impact is usually smaller than a broken signup form, because only people who pause or take a long step are hit. But those people are often the most engaged: they are doing real setup work, switching tabs to find an API key or waiting for a colleague to approve access.
- SignupAccount created, session starts
- Profile setupUser pauses to find details
- Session expiresNext click returns login or error
- Connect integrationNever reached
- ActivationKey action never happens
The user is logged out between steps 2 and 3, so later steps are lost.
Example: illustrative numbers showing how a short timeout can cut activation among users who pause during setup.
How to check if your site has it
You need to simulate a user who pauses. Do not just click through quickly, because a fast test never reaches the timeout.
Find the configured lifetime
Check your auth settings or ask your developer. Look for idle timeout, absolute timeout, access token lifetime and CSRF token lifetime.
Create a fresh test account
Use a private window and a new email address so no old session interferes.
Stop halfway and wait
Pause on a middle onboarding step for longer than the shortest timeout you found, or for 30 to 60 minutes if you do not know it.
Continue and watch what happens
Click Next or Save. Note whether you are logged out, shown an error, sent back to step one, or lose entered data.
Inspect the cookie
In browser DevTools open Application > Cookies and check the Expires / Max-Age of the session cookie. Also open the Network tab and look for 401 or 403 responses when you continue.
Try the email verification detour
Leave the tab, open the verification email on a phone or another browser, then return. Check that the original tab still works or recovers cleanly.
How to fix it
The right fix depends on how your app handles sessions. Start with the lifetime, then make the flow tolerant of a timeout anyway.
Lengthen the session for new users
Set the idle timeout long enough for realistic setup, for example hours rather than minutes. Balance this against security needs for sensitive apps.
Refresh the session while the user is active
Use sliding expiration so each request extends the session, or silently renew the token before it expires.
Save progress on the server at each step
Store answers as soon as each step is submitted, not only at the end, so a new login can resume where the user stopped.
Resume after login
If a user does get logged out, send them back to the onboarding step they were on after login, using a return URL, not to the dashboard or step one.
Fix CSRF and form tokens
Make form tokens last as long as the session, or reload a fresh token on submit failure and keep the typed values.
Show a clear message
If expiry is unavoidable, say so in plain words and keep entered data in the form.
Extend the login cookie
WordPress keeps users logged in for 2 days by default, or 14 days with Remember Me. Use the auth_cookie_expiration filter to change it.
Check plugins
Security or membership plugins often add their own idle logout. Look in their settings for session or inactivity timeout.
Set cookie and session lifetime
Change the session store TTL and cookie maxAge in your framework config, and enable rolling sessions if available.
Add a refresh path
If you use short-lived JWT access tokens, add a refresh token flow so the client gets a new token before the old one expires.
Review membership and portal settings
If onboarding sits behind a client portal or membership area, check its login and session settings. Options depend on your version, so check the current settings pages.
Check members area behaviour
Wix manages member sessions itself and offers limited control. If onboarding relies on a members login, test it after a long pause and shorten the number of steps behind login where you can.
add_filter( 'auth_cookie_expiration', function( $expiration, $user_id, $remember ) {
return 12 * HOUR_IN_SECONDS;
}, 10, 3 );app.use(session({
secret: process.env.SESSION_SECRET,
resave: false,
saveUninitialized: false,
rolling: true,
cookie: { maxAge: 1000 * 60 * 60 * 8, httpOnly: true, secure: true, sameSite: 'lax' }
}));Before
- Session ends after a short idle period
- User sees login page or generic error
- Entered answers are lost
- After login the user lands on the dashboard or step one
After
- Session renews while the user is active
- Progress saved on the server at each step
- If logged out, a clear message appears
- After login the user returns to the same step
How to confirm it's fixed
- Pause on a middle step for longer than the old timeout and continue without being logged out
- Check the session cookie expiry in DevTools matches your new setting
- Force a logout and confirm login returns you to the same onboarding step
- Confirm previously entered answers are still there
- Verify email in another browser and confirm the original tab still works
- Check the Network tab shows no 401 or 403 on step submits
How to prevent it happening again
- Document the session, token and CSRF lifetimes in one place
- Re-test onboarding with a long pause after any auth, security or framework update
- Add an automated test that expires the session mid-flow and checks recovery
- Review security plugin changes, which often shorten timeouts quietly
- Track users who hit the login page during onboarding as an analytics event
- Keep a note of the longest realistic step, such as waiting for an email or approval, and set timeouts above it
How FunnelGuard handles this
FunnelGuard does not check for this yet. A timed-step check that pauses mid-journey and confirms the session survives is a possible future addition, but it does not exist today.
What FunnelGuard does cover nearby: it runs your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, checks each step, and re-checks a failure from a second region before sending one alert with a screenshot and a likely cause. That can reveal a signup or onboarding step that breaks outright. It will not reveal a session that only expires after a long pause.
To watch for this yourself, repeat the manual pause test after each release, log 401 responses and unexpected logins in your app monitoring, and add a custom analytics event when a user lands on the login page during onboarding. You can start with the free FunnelGuard plan (1 site, 2 journeys, daily checks, no card) to cover the rest of your funnel.
0 min
User signs up and starts onboarding
10 min
User leaves to find an API key
31 min
Session idle timeout passes (example 30 min limit)
35 min
User returns, clicks Save and is sent to login with progress lost
Questions people ask
Why does my session expire during onboarding?
Usually the session or token lifetime is shorter than the time a new user needs to finish setup. Other causes are expired CSRF tokens, a security plugin adding an idle logout, or a second login in another browser invalidating the first.
How long should a session last during onboarding?
Long enough for the slowest realistic step, which is often several hours rather than minutes. The right value depends on how sensitive your app is, so use sliding expiration to renew the session while the user is active.
How do I stop users losing progress when they get logged out?
Save answers on the server as each step is submitted, and send the user back to the same step after login using a return URL. That way a timeout becomes a small interruption instead of a restart.
Why does the verification email log me out of onboarding?
Opening the link in another browser or app can create a new session and invalidate the old one, or the original tab's token may expire while you wait. Make the original tab recover by refreshing its session or by resuming after login.
How do I test for a session timeout in my signup flow?
Create a fresh test account in a private window, stop on a middle step for longer than your timeout, then click Next. Check whether you are logged out, shown an error or lose data, and look for 401 responses in DevTools.
Does FunnelGuard detect session timeouts in onboarding?
No. FunnelGuard does not check this yet, though a timed-step check is a possible future addition. It does run your real journeys on a schedule and alerts you when a step breaks outright, so test long pauses manually.
Is a short session timeout a security feature or a bug?
Both can be true. Short timeouts reduce risk on shared devices, but for new users mid-setup they cause avoidable drop-off. Compromise with sliding expiration, saved progress and a clear resume path.