Auto login user after email verification link click

Currently I am able to provide a redirectTo field so that a user can be taken back to my application after he clicks the email verification link. But I want to log him directly after this confirmation. For that I need a way to be able to put the access_token and id_token fields to that redirect url.

Overall how do I get the user to login directly after clicking on the verification email link.

I am using the standard lock widget in a modal popup( redirect: false mode) because its a SPA.

5 Likes

Bump for this. Also interested :pray:
Our use-case is a custom Vue SPA with auth0.js, but I’d imagine the process to be similar. We have Express at our disposal as well, if that would somehow help out here (e.g. log the user in via the Authentication API?)

We also need it! Maybe there is some workaround?

Good morning @yevhen.voroniuk, can you share a bit more about your use case as well as stack. I will begin to investigate this topic. Thanks!

I wanted to follow up on this front to see if you could provide any additional details? Thanks!

I’m not sure about @yevhen.voroniuk, but I’ll describe what we’re trying to achieve:
When the user confirms their e-mail (aka clicks the link in their confirmation e-mail), we’d like them to be logged in immediately. I’d imagine this to be technically possible as you could include an OTP (same as with the Passwordless e-mail login) within the confirmation link?

I know that the two connections are kept in separate databases. Would it be possible though if we were to link all users (from the password database with our passwordless users of the same e-mail)?

After talking with another engineer I was able to confirm that it’s not possible at this time out of the box.

You could theoretically validate the user after a login with a rule but then you stand the change of piling up users who haven’t been validated successfully.

I would recommend sharing your use case with our product team over at auth0.com/feedback. Each submitted request is read by our product team and help set the tone for the roadmap moving forward as far as features and enhancements. Thanks!

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