Pre Login Condition Execution

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.

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 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 object, but generally you can determine if there is an existing session from the application side using a method such as checkSession() (which would differ depending on the SDK version being used).

I hope this helps!
Thanks,
Remus

Thank You @remus.ivan . It helps.

1 Like