# Prevent signin on signup

**URL:** <https://community.auth0.com/t/prevent-signin-on-signup/127977>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [February 21, 2024, 4:30pm UTC](https://community.auth0.com/t/prevent-signin-on-signup/127977 "2024-02-21T16:30:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![walim.masmoudi](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@walim.masmoudi](https://community.auth0.com/u/walim.masmoudi)\
**Post date:** [February 21, 2024, 4:30pm UTC](https://community.auth0.com/t/prevent-signin-on-signup/127977/1 "2024-02-21T16:30:36Z")

</div>

Hello,

When a user signup, it automatically authenticates him by executing the login script.

Is it possible to prevent that ? I would like to prevent login as long as the user does not validate his email.

Thanks a lot

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 21, 2024, 4:47pm UTC](https://community.auth0.com/t/prevent-signin-on-signup/127977/3 "2024-02-21T16:47:46Z")

</div>

Hey @walim.masmoudi !

The easiest way to go about this is to use an Action to block logins without a verified email:

[https://community.auth0.com/t/verifying-users-in-actions/84669](https://community.auth0.com/t/verifying-users-in-actions/84669)

---

<div class="post-metadata">

**Author:** ![walim.masmoudi](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@walim.masmoudi](https://community.auth0.com/u/walim.masmoudi)\
**Post date:** [February 21, 2024, 5:02pm UTC](https://community.auth0.com/t/prevent-signin-on-signup/127977/4 "2024-02-21T17:02:05Z")

</div>

Thank you for your response.

It it possible to do it with a custom database ? Because i need to call an api endpoint to know if the user has verified his email.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [February 26, 2024, 11:24pm UTC](https://community.auth0.com/t/prevent-signin-on-signup/127977/5 "2024-02-26T23:24:08Z")

</div>

Hey there @walim.masmoudi, sorry for the delayed response here!

> [@walim.masmoudi](#):
>
> It it possible to do it with a custom database ? Because i need to call an api endpoint to know if the user has verified his email.

You can certainly call an external endpoint from within action code:

> [@How do I call my API from an Action?](https://community.auth0.com/t/how-do-i-call-my-api-from-an-action/69041):
>
> Hey, So I’m in the process of trying to add a user to my database using an API call from a “Post User Registration” Action. I have followed this blog post here: and seem to have everything looking good. On top of that when I run the test it says the action was successful. The only problem is that my API is not being called at all even though I have triple checked that the URL is correct. Here is the code I’m working with: import axios from "axios"; exports.onExecutePostUserRegistration = …

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [March 11, 2024, 11:24pm UTC](https://community.auth0.com/t/prevent-signin-on-signup/127977/6 "2024-03-11T23:24:40Z")

</div>

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