Hi Auth0 Team,
I am working on a product that uses different authentication flow patterns. We have a custom Next.js user registration page using the Auth0 Management API. The user account is created successfully. When the user clicks the Auth0 email verification link, we get an error: “Open this link in a different browser.” However, we are already using the same browser.
Is there a way to create a fully custom registration and email verification flow with Auth0, for example with a custom verification link or page? We also need to support social logins in addition to email/password registration.
Additionally, I would like to implement a magic link (passwordless) login option from our custom login page. The goal is for users to receive a login link by email and authenticate without a password, alongside traditional and social login options.
Please note:
-
We do not use Auth0’s Universal Login page or Classic page options.
-
In these scenarios, the official Auth0 Next.js SDK does not seem to work as expected for our use case—particularly for fully custom flows and passwordless. Guidance on workarounds or alternatives would be appreciated.
Please advise on best practices for combining custom registration, email verification, social logins, and magic link passwordless login using Auth0 in a Next.js app. Let me know if any more details are needed to help resolve this issue.
Hi @sabinflutter
Welcome to the Auth0 Community!
How are you sending the verification email exactly to the user? I would suggest using the Management API to send a email verification job.
Regarding supporting social connections, you would need to redirect the user to the proper /authorize
call within your custom login page. For example, an /authorize
call to a google social connection would be:
https://{{YOUR_AUTH0_DOMAIN}}/authorize?
response_type=code&
client_id={{APPLICATION_CLIENT_ID&
connection={{CONNECTION_NAME}}&
redirect_uri={{REDIRECT_URI}})
Please take note that you would need to use the NAME of the connection not the ID.
Otherwise, in regards to having a passwordless flow along side the ones you have stated above might introduce some difficulties or problems. I would recommend to take a look at our documentation regarding our Authentication API with Passwordless. I believe in your custom registration page you should be able to use the Authentication API to simply send the link to the user.
However, what I am not clearly understanding regarding your approach, are you using a custom login page or do you only handle registration? If you are only handling registration, you might run into issues regarding having both password and passwordless authentication. My personal suggestion for a situation like this would be to handle Passwordless authentication through a SAML/OIDC connection to a 2nd Auth0 tenant.
If you have any other questions or if I have missed anything, please let me know!
Kind Regards,
Nik