# Migration from Cognito Using Actions

**URL:** <https://community.auth0.com/t/migration-from-cognito-using-actions/129105>\
**Category:** Get Help\
**Tags:** custom-webtasks, deprecations\
**Created:** [March 6, 2024, 7:13pm UTC](https://community.auth0.com/t/migration-from-cognito-using-actions/129105 "2024-03-06T19:13:22Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmusits](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmusits/32/55436_2.png) [@jmusits](https://community.auth0.com/u/jmusits)\
**Post date:** [March 6, 2024, 7:13pm UTC](https://community.auth0.com/t/migration-from-cognito-using-actions/129105/1 "2024-03-06T19:13:22Z")

</div>

In reading through [this](https://community.auth0.com/t/migrating-aws-cognito-users-into-auth0/103686) knowledge base article, it looks like the Automatic migration of Cognito users to Auth0 utilizes Rules / Hooks, which are marked as deprecated and soon to be EOL’d [here](https://auth0.com/docs/customize/hooks) and [here](https://auth0.com/docs/customize/rules).

Is it possible to perform the same migration using [actions](https://auth0.com/docs/customize/actions)? From my reading it looks like the `login` event fires `post-login`, as documented [here](https://auth0.com/docs/customize/actions/flows-and-triggers).

Is there an event that fires _during_ the login process (ie: after Auth0 does not find the user in it’s database), so it can reach out to Cognito to validate the login and migrate the user to Auth0?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![sam.yapkowitz](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/sam.yapkowitz/32/45900_2.png) [@sam.yapkowitz](https://community.auth0.com/u/sam.yapkowitz)\
**Post date:** [March 6, 2024, 10:23pm UTC](https://community.auth0.com/t/migration-from-cognito-using-actions/129105/2 "2024-03-06T22:23:11Z")

</div>

Hey Jason,

Those scripts (while they do look similar) are actually not leveraging Rules/Hooks, but rather they are leveraging our [Custom Database Action Scripts](https://auth0.com/docs/authenticate/database-connections/custom-db/templates) which are not currently set to be deprecated. When a user attempts to login when this flow is enabled, Auth0 will execute these scripts to connect into whatever external user store you are currently trying to migrate from.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![jmusits](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmusits/32/55436_2.png) [@jmusits](https://community.auth0.com/u/jmusits)\
**Post date:** [March 6, 2024, 10:49pm UTC](https://community.auth0.com/t/migration-from-cognito-using-actions/129105/3 "2024-03-06T22:49:04Z")

</div>

Hey Sam,

Thanks for the explanation, this is very helpful.

Jason

---

<div class="post-metadata">

**Author:** ![jmusits](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmusits/32/55436_2.png) [@jmusits](https://community.auth0.com/u/jmusits)\
**Post date:** [April 16, 2024, 8:15pm UTC](https://community.auth0.com/t/migration-from-cognito-using-actions/129105/4 "2024-04-16T20:15:55Z")

</div>

Hi Sam,

One more question - I am having trouble getting the Enterprise OIDC connection to Cognito made. I get an error stating that options.issuer is required. As far as I can tell things are setup in Cognito properly (all scopes are selected).

Is there a guide for setting this up? I have not been able to find one in the Auth0 documentation.

Thanks!

---

<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:** [March 18, 2025, 1:17pm UTC](https://community.auth0.com/t/migration-from-cognito-using-actions/129105/6 "2025-03-18T13:17:32Z")

</div>

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