Next.js and Linking accounts

Following this guide: User Account Linking: Server-Side Implementation I have a Next.js app and the document talks about linking accounts with same emails. What about linking accounts that the user hasn’t created – like logging in for the first time?

Is there a way to have a URL you click to popup a new Auth0 Login screen, login and that account will be linked? Basically, what’s the way to get the secondary user ID? And yes, I’ve seen the RegWebApp example – however it seems to be broken.