# Initiating signup flow from different subdomain

**URL:** <https://community.auth0.com/t/initiating-signup-flow-from-different-subdomain/9264>\
**Category:** Get Help\
**Tags:** auth0-subdomain\
**Created:** [January 23, 2018, 1:38pm UTC](https://community.auth0.com/t/initiating-signup-flow-from-different-subdomain/9264 "2018-01-23T13:38:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![seb](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/seb/32/7443_2.png) [@seb](https://community.auth0.com/u/seb)\
**Post date:** [January 23, 2018, 1:38pm UTC](https://community.auth0.com/t/initiating-signup-flow-from-different-subdomain/9264/1 "2018-01-23T13:38:52Z")

</div>

I have an Angular 5 SPA and I’m trying to set things up to have a marketing page for my app on a different subdomain, but for users to be able to login or signup directly from that marketing page and then be redirected to the main app. So, for example:

- A marketing page at [https://a.mydomain.com](https://a.mydomain.com)
- The SPA at [https://b.mydomain.com](https://b.mydomain.com)

And I’m trying to have it so a user can initiate the flow on the first subdomain and then be redirected and logged-in to the different subdomain.

The problem that I’m facing is that once the user initiates from the first subdomain, an error occurs when being redirected to the second subdomain:

`{error: "invalid_token", errorDescription: "state does not match" }`

From my understanding, a state gets generated in localStorage when first initiating the flow, but then upon redirection the state doesn’t match because the 2nd subdomain never got that state. I’m wondering if there’s any easy way around that, or if it’s just not a type of flow that’s possible to achieve?

Thanks in advance for any help,  
Seb

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 14, 2018, 6:06pm UTC](https://community.auth0.com/t/initiating-signup-flow-from-different-subdomain/9264/2 "2018-12-14T18:06:38Z")

</div>

As it has been more than a few months since this topic was opened, and there has been no reply or further information provided as to the existence of the issue, we are closing this topic. Please don’t hesitate to create a new topic if this issue is still present, we would be happy to work with you to help find a resolution.

---

<div class="post-metadata">

**Author:** ![James.Morrison](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/james.morrison/32/13507_2.png) [@James.Morrison](https://community.auth0.com/u/James.Morrison)\
**Post date:** [December 14, 2018, 6:06pm UTC](https://community.auth0.com/t/initiating-signup-flow-from-different-subdomain/9264/3 "2018-12-14T18:06:42Z")

</div>


