I would like to ask if there is a confirmation function for owning an email address

I would like to ask if there is a confirmation function for owning an email address.

We are using Auth0 and are developing email address registration.
Currently, you can log in to the site immediately after registration.
From there, I would like to change it so that I can not log in to the site until I can confirm the ownership of the email address after registration.

We have contacted you to confirm that there is a function (including the screen) to confirm the ownership of your e-mail address.

We would appreciate it if you could reply.

Hi @s.kubo,

Welcome to the Auth0 Community!

I understand you are looking for a way to prevent users from logging in to your application until they have verified their email address.

To do so, there is the option to use the Auth0 Post-Login Action to deny the user access if their email address is not verified.

Below is the Post-Login Action script code needed to accomplish this:

exports.onExecutePostLogin = async (event, api) => {
  if (!event.user.email_verified){
    api.access.deny(`Please verify your email address to continue access to ${event.client.name}.`);

Hoped this helps!

Please do not hesitate to reach out if you have any further questions.

Thank you.

1 Like

thank you for your reply.

I will try it with the contents you received.

1 Like

Thank you for answering the question the other day.

When I tried it, it was solved successfully.

1 Like

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