# Pre Login Condition Execution

**URL:** <https://community.auth0.com/t/pre-login-condition-execution/190446>\
**Category:** Get Help\
**Tags:** identifier-first, login-experience\
**Created:** [August 11, 2025, 3:02pm UTC](https://community.auth0.com/t/pre-login-condition-execution/190446 "2025-08-11T15:02:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhouken75034](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zhouken75034/32/70833_2.png) [@zhouken75034](https://community.auth0.com/u/zhouken75034)\
**Post date:** [August 11, 2025, 3:02pm UTC](https://community.auth0.com/t/pre-login-condition-execution/190446/1 "2025-08-11T15:02:29Z")

</div>

Hi Team,  
While creating Login Triggers in Action, i can see only we can have the triggers after the authentication done. I want to have the some conditions check for example if there is any existing session or any attributes exits before forest level authn itself. I saw there is onExecutePrelogin, but where can i fit in Action and trigger flow as the UI allows only after the first level authn.

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [August 11, 2025, 10:39pm UTC](https://community.auth0.com/t/pre-login-condition-execution/190446/3 "2025-08-11T22:39:35Z")

</div>

Hi @zhouken75034,

Welcome to the Auth0 Community!

Unfortunately there is no pre-build PreLogin Action that is currently available in the Auth0 Dashboard. However you can execute most of your described operations using the [Login Trigger](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger) as well, such as querying users for existing attributes (e.g., email domain, metadata, or roles) since the `onExecutePostLogin` is triggered after the user has successfully authenticated their identity, but before tokens are issued.

You can also query lots of proprieties from within the [event.session](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger/post-login-event-object) object, but generally you can determine if there is an existing session from the application side using a method such as [checkSession()](https://auth0.com/docs/authenticate/login/configure-silent-authentication#poll-with-checksession-) (which would differ depending on the SDK version being used).

I hope this helps!  
Thanks,  
Remus

---

<div class="post-metadata">

**Author:** ![zhouken75034](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/zhouken75034/32/70833_2.png) [@zhouken75034](https://community.auth0.com/u/zhouken75034)\
**Post date:** [August 12, 2025, 2:35am UTC](https://community.auth0.com/t/pre-login-condition-execution/190446/4 "2025-08-12T02:35:49Z")

</div>

Thank You @remus.ivan . It helps.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [August 26, 2025, 2:36am UTC](https://community.auth0.com/t/pre-login-condition-execution/190446/5 "2025-08-26T02:36:11Z")

</div>

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