completeInteractiveLogin return value — user, session, and idToken not present (auth0-nuxt)

Hi,

I’m following up on a previous thread about accessing user data in the Auth0 callback when using auth0-nuxt: Auth0-nuxt and access to the user data in callback - #3 by remus.ivan

I’ve tried the suggested approaches and they don’t match what the SDK actually returns.

1. First suggestion: user from result.user or result.session?.user

The suggestion was to use result.user or result.session?.user from completeInteractiveLogin. In our setup with @auth0/auth0-nuxt, completeInteractiveLogin only returns:

{ appState?: TAppState; authorizationDetails?: AuthorizationDetails[] }

There is no user or session property. In the TypeScript definitions, authorizationDetails is undefined in the standard Authorization Code flow and only set when Rich Authorization Requests (RAR) are used. Enabling RAR would require an extra consent screen, which we don’t want.

2. Second suggestion: decoding result.idToken

The suggestion was to use jwtDecode(result.idToken) to get user claims. But the result object from completeInteractiveLogin does not expose an idToken property. The SDK stores the session (including user data and tokens) in encrypted cookies and does not return them from completeInteractiveLogin.

Current workaround:
We’ve implemented a “pending-resolve” pattern: we set a short-lived cookie in the callback and run aditional api call in a server middleware on the next request, when the session cookies are present. That works, but we’d prefer to rely on officially supported behavior.

Question:
What is the recommended way to access user data or run post-login logic in the callback when using auth0-nuxt?

Is the “run logic on the next request” pattern the intended approach, or is there an alternative we should be using?

Thanks in advance for any guidance.