# SPA + Embedded Login + Token Refresh Strategy?

**URL:** <https://community.auth0.com/t/spa-embedded-login-token-refresh-strategy/19496>\
**Category:** Get Help\
**Created:** [January 1, 2019, 12:49pm UTC](https://community.auth0.com/t/spa-embedded-login-token-refresh-strategy/19496 "2019-01-01T12:49:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nicolas\_sabena](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nicolas_sabena/32/6064_2.png) [@nicolas\_sabena](https://community.auth0.com/u/nicolas_sabena)\
**Post date:** [January 1, 2019, 9:41pm UTC](https://community.auth0.com/t/spa-embedded-login-token-refresh-strategy/19496/2 "2019-01-01T21:41:32Z")

</div>

( **EDIT** : added the fourth possibility, dev keys)

If `checkSession` is returning `login_required` this means that Auth0 could not find a valid session for the user. This could be because:

- A session was never created. When instantiating Lock, are you using the `sso: false` option? Doing so instructs Lock to use the token endpoint directly, without setting a session for the user.
- The session has expired. Check the session duration in the [tenant Advanced Settings](https://manage.auth0.com/#/tenant/advanced).
- The session cookie was not included in the request. This could happen if you are not using custom domains and the browser blocks the third-party cookie. [Safari actively blocks this](https://auth0.com/docs/api-auth/token-renewal-in-safari).
- Using social connections with the default developer keys won’t set an SSO session (see [Test Social Connections with Auth0 Developer Keys](https://auth0.com/docs/connections/social/devkeys)). Make sure you configure your own keys.

Do any of these help explain the situation?

---

_[View the full topic](https://community.auth0.com/t/spa-embedded-login-token-refresh-strategy/19496)._
