We're running into problems updating our user and ...
# ask-a-descoper
u
We're running into problems updating our user and adding custom flows when continuing from"Successful verification" continuation of enchanted flows. When a user initiates an enchanted link from the login screen (let's call it the login tab), the open a new tab/window from the email link (let's call it the email tab). If we continue from the login tab (in the flow this is the "polling" endpoint) it seems to work, but we prefer to continue from the email tab (as users w/100s of tabs often can't find their original tab) but then we seem to fail operations such as adding custom fields to the user because of "missing JWT" but if we don't try to add custom field and reach END, we can still login to our app suggesting that the JWT is in fact present. Are we just using it wrong (i.e. this is not supported) or is there something else going on?
r
Hey Uri, Hope you are doing good. You're encountering the expected behavior of Enchanted Links. The session is validated exclusively on the originating device (the login tab), not on the device where the link is clicked (the email tab) When the user clicks the enchanted link in the email tab, that action triggers verification, but the session itself starts only on the originating device. This is a core security feature: "When the user clicks the correct link, their session on the originating device is validated, and they are logged in". The "missing JWT" error when trying to add custom fields from the email tab occurs because no authenticated session exists in that context—the JWT is only available on the login tab after polling completes Solution: Continue from the login tab (polling endpoint) as designed. If users struggle to find their original tab, consider: • Using Magic Link instead, where the session follows the clicked link • Implementing UI guidance to help users return to the login tab • Using browser notifications or other UX patterns to draw attention back to the originating tab The architecture is intentional: Enchanted Links are "optimized for cross-device logins" where "the session stays on the originating device", making them more suitable for scenarios where users deliberately use separate devices, not separate tabs on the same device. Check this docs: https://docs.descope.com/auth-methods/enchanted-link#comparing-enchanted-link-to-magic-link https://docs.descope.com/auth-methods/enchanted-link/with-sdks/backend
u
Thanks!