# Social login trigger a script

**URL:** <https://community.auth0.com/t/social-login-trigger-a-script/183351>\
**Category:** Get Help\
**Tags:** user-import-export, user-management\
**Created:** [March 5, 2025, 6:18am UTC](https://community.auth0.com/t/social-login-trigger-a-script/183351 "2025-03-05T06:18:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![denmark.daya](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/denmark.daya/32/60297_2.png) [@denmark.daya](https://community.auth0.com/u/denmark.daya)\
**Post date:** [March 5, 2025, 6:18am UTC](https://community.auth0.com/t/social-login-trigger-a-script/183351/1 "2025-03-05T06:18:56Z")

</div>

Hi all,

Just wanted to ask if there’s a way an social login can trigger a (before or after) script, so we can run some API endpoints prior to logging in?

Basically, what we need to check is if the social logging in user is available in our API, we then process either allow or reject depending on its response?

Appreciate the help.

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [March 31, 2025, 4:38pm UTC](https://community.auth0.com/t/social-login-trigger-a-script/183351/3 "2025-03-31T16:38:48Z")

</div>

Hi @denmark.daya

Welcome to the Auth0 Community!

Thank you for posting your question. I would suggest using the post-login action with the api.access.deny() method if your user is not available in your API.

> **[Login Trigger](https://auth0.com/docs/customize/actions/explore-triggers/signup-and-login-triggers/login-trigger)**
>
> Learn about the Actions Login Flow and the post-login Action trigger, which is executed after a user logs in and when a Refresh Token is requested.

Thanks  
Dawid

---

<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:** [April 14, 2025, 4:39pm UTC](https://community.auth0.com/t/social-login-trigger-a-script/183351/4 "2025-04-14T16:39:26Z")

</div>

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