Post Login Action distinguish between login and silent authentication

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?

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

if (event.request.query.prompt === 'none') {
    return;
}
1 Like

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

1 Like

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