# Continue authentication flow outside of login popup

**URL:** <https://community.auth0.com/t/continue-authentication-flow-outside-of-login-popup/198107>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [March 16, 2026, 9:29pm UTC](https://community.auth0.com/t/continue-authentication-flow-outside-of-login-popup/198107 "2026-03-16T21:29:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![adam.clark2](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/adam.clark2/32/59424_2.png) [@adam.clark2](https://community.auth0.com/u/adam.clark2)\
**Post date:** [March 16, 2026, 9:29pm UTC](https://community.auth0.com/t/continue-authentication-flow-outside-of-login-popup/198107/1 "2026-03-16T21:29:39Z")

</div>

We have some post-login actions that may guide users through account setup or management options. We want these to happen before the user is fully authenticated, so the actions seem like the right place for these.

The issue is that when we use `loginWithPopup` these management screens get squeezed into the small popup window. Our latest headache involves needing to open a _second_ popup window, which leads to a bunch of other issues.

What we’d like to be able to do is close the popup and continue the authentication flow in the parent window. I naively tried just copying the popup’s location to `window.opener` from our management page – this seems to allow the flow to complete but it ends at `/authorization/resume` with Javascript trying to call back to the opener window.

It seems like Auth0 “knows” internally that this is a popup login – perhaps there’s a way to flip a bit somewhere so it behaves like a redirect login?

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [March 17, 2026, 5:00pm UTC](https://community.auth0.com/t/continue-authentication-flow-outside-of-login-popup/198107/4 "2026-03-17T17:00:14Z")

</div>

Hi @adam.clark2

Unfortunately, because the authentication flow’s parameters (like `response_mode` and `state` variables) are cryptographically bound when the transaction is initiated, Auth0 cannot change the contract halfway through. The recommended approach to handle complex, multi-screen account setup is to defer the UI rendering to your main application _after_ the Auth0 login completes, rather than handling it mid-transaction via an Action redirect.

Instead of redirecting the user out of the Auth0 pipeline to a management screen, let the popup flow complete quickly and silently. Use the Auth0 Action solely to compute whether the user needs to complete the setup, and pass that flag to your SPA.

The code would look something like this:

```auto
exports.onExecutePostLogin = async (event, api) => {
  const namespace = 'https://your-app.com';
  
  if (event.stats.logins_count === 1) {
    api.idToken.setCustomClaim(`${namespace}/needs_setup`, true);
  }
};

```

If you have any other questions, let me know!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [March 31, 2026, 5:00pm UTC](https://community.auth0.com/t/continue-authentication-flow-outside-of-login-popup/198107/5 "2026-03-31T17:00:42Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
