# Issue with SSO on 2 apps

**URL:** <https://community.auth0.com/t/issue-with-sso-on-2-apps/115223>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [September 1, 2023, 3:13pm UTC](https://community.auth0.com/t/issue-with-sso-on-2-apps/115223 "2023-09-01T15:13:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon\_ncass](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jon_ncass/32/50468_2.png) [@jon\_ncass](https://community.auth0.com/u/jon_ncass)\
**Post date:** [September 1, 2023, 3:13pm UTC](https://community.auth0.com/t/issue-with-sso-on-2-apps/115223/1 "2023-09-01T15:13:17Z")

</div>

app 1: using the react configuration  
app 2: uses vanilla JS configuration

app 2: uses a event to trigger to auth0Client.handleRedirectCallback()

if i login to app 1 i would expect app 2 to be able to use the cookie to login, how ever it does not, and im at a lose to why,  
single Username-Password-Authentication connection, using 2 applications on the same domain. any advice or pointers to articles that would help.

---

<div class="post-metadata">

**Author:** ![suchislife801](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/suchislife801/32/50280_2.png) [@suchislife801](https://community.auth0.com/u/suchislife801)\
**Post date:** [September 1, 2023, 4:04pm UTC](https://community.auth0.com/t/issue-with-sso-on-2-apps/115223/2 "2023-09-01T16:04:44Z")

</div>

Issue could be due to multiple factors: SameSite cookie attributes, subdomain handling, or incorrect Auth0 client setup. Make sure:

1. Both apps share the same Auth0 `domain` and `client_id`.
2. Cookies are set with `SameSite=None; Secure` if apps are on different subdomains.
3. Use `checkSession` method in App 2 to check for existing session.

For App 2, on page load or event:

```javascript
auth0Client.checkSession({}, (err, authResult) => {
  if (authResult && authResult.accessToken) {
    // User is logged in
    // Set user session
  } else {
    // Handle error or login
  }
});

```

For more details, refer to Auth0’s SSO documentation: [Auth0 SSO](https://auth0.com/docs/sso/current).

If issue persists, debugging steps:

1. Check browser console for errors.
2. Inspect network tab for failed requests.
3. Check Auth0 logs for anomalies.

No partial answers, just actionable steps. Hope this helps.

---

<div class="post-metadata">

**Author:** ![jon\_ncass](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jon_ncass/32/50468_2.png) [@jon\_ncass](https://community.auth0.com/u/jon_ncass)\
**Post date:** [September 5, 2023, 8:57am UTC](https://community.auth0.com/t/issue-with-sso-on-2-apps/115223/3 "2023-09-05T08:57:04Z")

</div>

after further investigation we are using custom domains which i was unaware of, updated domain to use custom domain - issue now resolved.

Thank ypu @suchislife801

---

<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:** [September 19, 2023, 8:57am UTC](https://community.auth0.com/t/issue-with-sso-on-2-apps/115223/4 "2023-09-19T08:57:59Z")

</div>

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