# renewToken always results in login\_required for non-social connections

**URL:** <https://community.auth0.com/t/renewtoken-always-results-in-login-required-for-non-social-connections/8237>\
**Category:** Get Help\
**Tags:** renewauth\
**Created:** [September 19, 2017, 4:12am UTC](https://community.auth0.com/t/renewtoken-always-results-in-login-required-for-non-social-connections/8237 "2017-09-19T04:12:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucjansuski](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lucjansuski/32/7269_2.png) [@lucjansuski](https://community.auth0.com/u/lucjansuski)\
**Post date:** [September 19, 2017, 4:12am UTC](https://community.auth0.com/t/renewtoken-always-results-in-login-required-for-non-social-connections/8237/1 "2017-09-19T04:12:05Z")

</div>

Whenever I call renewToken, it always results in login\_required error. I do not use any social connections, just plain email/password.

```
const authSettings = {
  domain: 'methyl.eu.auth0.com',
  clientID: 'iv2PuRrlF7UrEaDBDzCx8ARUmO23r9R5',
  redirectUri: 'http://localtest.me/callback',
  responseType: 'id_token',
  scope: 'openid email',
}

let auth = null
const getAuth = () => {
  if (auth) {
    return auth
  } else {
    auth = new auth0.WebAuth(authSettings)
    return auth
  }
}

export const renewAuth = onSuccess =>
  getAuth().renewAuth(
    {
      usePostMessage: true,
      redirectUri: 'http://localtest.me/silent-callback.html',
    },
    (err, authResult) => {
      console.log(err, authResult)
    }
  )
<!DOCTYPE html>
<html>

<head>
  <script type="text/javascript">
    console.log(window.location.hash)
    // parent.postMessage({ type: 'auth0', hash: window.location.hash }, "http://app.development:3001");
  </script>
</head>

<body></body>

</html>

```

Whenever I call renewAuth, it always logs `#error=login_required&error_description=Login%20required` from silent-callback.html.

---

<div class="post-metadata">

**Author:** ![lucjansuski](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/lucjansuski/32/7269_2.png) [@lucjansuski](https://community.auth0.com/u/lucjansuski)\
**Post date:** [September 19, 2017, 6:16pm UTC](https://community.auth0.com/t/renewtoken-always-results-in-login-required-for-non-social-connections/8237/2 "2017-09-19T18:16:50Z")

</div>

3rd party cookies are causing the problem: [Using renewAuth with 3rd party cookies disabled - Auth0 Community](http://community.auth0.com/questions/8940/using-renewauth-with-3rd-party-cookies-disabled)

---

<div class="post-metadata">

**Author:** ![ayyash](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ayyash/32/7669_2.png) [@ayyash](https://community.auth0.com/u/ayyash)\
**Post date:** [February 14, 2018, 11:00pm UTC](https://community.auth0.com/t/renewtoken-always-results-in-login-required-for-non-social-connections/8237/3 "2018-02-14T23:00:22Z")

</div>

So enabling cookies is the only way for a silent refresh? 😕 what’s the other option? Server side authentication?

---

<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 2, 2018, 5:56am UTC](https://community.auth0.com/t/renewtoken-always-results-in-login-required-for-non-social-connections/8237/4 "2018-03-02T05:56:34Z")

</div>


