# Renew token doesn't return new id\_token

**URL:** <https://community.auth0.com/t/renew-token-doesnt-return-new-id-token/6800>\
**Category:** Get Help\
**Tags:** auth, renew, renewauth, id-token, id\_token\
**Created:** [May 30, 2017, 8:17pm UTC](https://community.auth0.com/t/renew-token-doesnt-return-new-id-token/6800 "2017-05-30T20:17:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mathieu1](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@mathieu1](https://community.auth0.com/u/mathieu1)\
**Post date:** [May 30, 2017, 8:17pm UTC](https://community.auth0.com/t/renew-token-doesnt-return-new-id-token/6800/1 "2017-05-30T20:17:17Z")

</div>

We’ve a problem refreshing token on iOS application in swift.  
We set `openid offline_access read update:users update:users_app_metadata` scope at login.

But when we ask to refresh via the “renew” method, “id\_token” is always empty.  
How to get a new id\_token returned when renew is called ?

---

<div class="post-metadata">

**Author:** ![jmangelo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jmangelo/32/7923_2.png) [@jmangelo](https://community.auth0.com/u/jmangelo)\
**Post date:** [May 31, 2017, 3:35pm UTC](https://community.auth0.com/t/renew-token-doesnt-return-new-id-token/6800/2 "2017-05-31T15:35:57Z")

</div>

You did not specify the exact method through which you login so this is more an educated guess than a definitive answer, however, based on the information available it’s highly likely that you performed a login through a method that is associated to a legacy feature set and then are trying to use `renew` which is associated to a newer feature set.

At this time, the recommended and newer feature set revolves around API authorization and OpenID Connect (OIDC) compliance. However, we could not remove already existing endpoints that were already available even before the final version of the specification was available as that would break existing users.

The **documentation of the `renew` method either in [GitHub](https://github.com/auth0/Auth0.swift/blob/ef71d0f96c29ad479597efd29b0064b45f3c805f/Auth0/Authentication.swift#L391) or [CocoaDocs](http://cocoadocs.org/docsets/Auth0/1.4.0/Protocols/Authentication.html#/s:FP5Auth014Authentication5renewFT16withRefreshTokenSS5scopeGSqSS__GVS_7RequestCS_11CredentialsCS_19AuthenticationError_) hints at the situation that may be causing the error**, more specifically, if you are **using an authentication method that does not leverage API authorization or OIDC compliance then the refresh token should be used with the method `delegation` instead of `renew`**.

If you’re starting development for a new application the recommended approach would be to make use of the endpoints that support API authorization and at the same time more strictly follow OIDC. You can read more about these topics at:

- [Introducing OIDC Conformant Authentication](https://auth0.com/docs/api-auth/intro)
- [API Authorization](https://auth0.com/docs/api-auth)

---

<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:54am UTC](https://community.auth0.com/t/renew-token-doesnt-return-new-id-token/6800/3 "2018-03-02T05:54:12Z")

</div>


