# Post Login Action distinguish between login and silent authentication

**URL:** <https://community.auth0.com/t/post-login-action-distinguish-between-login-and-silent-authentication/65600>\
**Category:** Get Help\
**Tags:** actions, login, silent-authenticatio, auth0\
**Created:** [July 5, 2021, 1:25pm UTC](https://community.auth0.com/t/post-login-action-distinguish-between-login-and-silent-authentication/65600 "2021-07-05T13:25:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yufuven](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yufuven/32/30365_2.png) [@yufuven](https://community.auth0.com/u/yufuven)\
**Post date:** [July 5, 2021, 1:25pm UTC](https://community.auth0.com/t/post-login-action-distinguish-between-login-and-silent-authentication/65600/1 "2021-07-05T13:25:32Z")

</div>

I’m trying to configure an action that gets executed after login to send an event to mixpanel, however I’m seeing that the Post Login action is also executed when a Silent Authentication happens.

I’ve been trying to look for a difference between the event on the login and the event on the silent authentication from the context of the action and I haven’t been able to find any.

How can I check if the action is being executed because of a login or because of a silent authentication?

---

<div class="post-metadata">

**Author:** ![yufuven](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/yufuven/32/30365_2.png) [@yufuven](https://community.auth0.com/u/yufuven)\
**Post date:** [July 5, 2021, 5:15pm UTC](https://community.auth0.com/t/post-login-action-distinguish-between-login-and-silent-authentication/65600/2 "2021-07-05T17:15:24Z")

</div>

I’ve solved this by checking if in the query the prompt is none. I found on the docs of the `/authorize` that requesting with prompt=none is what characterizes a silent authentication.

So I guess this is a good method on checking this.

Docs: [Configure Silent Authentication](https://auth0.com/docs/authorization/configure-silent-authentication#initiate-silent-authentication-requests)

```auto
if (event.request.query.prompt === 'none') {
    return;
}

```

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 6, 2021, 9:38am UTC](https://community.auth0.com/t/post-login-action-distinguish-between-login-and-silent-authentication/65600/3 "2021-07-06T09:38:50Z")

</div>

Perfect and thanks for sharing it with the rest of community!

---

<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:** [July 21, 2021, 9:39am UTC](https://community.auth0.com/t/post-login-action-distinguish-between-login-and-silent-authentication/65600/4 "2021-07-21T09:39:36Z")

</div>

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