# I cant find a way to refresh idToken with refreshToken while having OIDC disabled

**URL:** <https://community.auth0.com/t/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327>\
**Category:** Get Help\
**Tags:** idtoken, oidc, refresh-tokens\
**Created:** [September 28, 2017, 3:00pm UTC](https://community.auth0.com/t/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327 "2017-09-28T15:00:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![witek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/witek/32/5170_2.png) [@witek](https://community.auth0.com/u/witek)\
**Post date:** [September 28, 2017, 3:00pm UTC](https://community.auth0.com/t/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327/1 "2017-09-28T15:00:25Z")

</div>

Hi there, I am using Auth0 with facebook (in an iOS app) to authenticate users in graph.cool, and to do so, I need to have HS256 encoding turned on with OIDC off. My problem is, the I cant get new idToken, while i do `Auth0.authentication().renew` or `Auth0.authentication().tokenExchange`. All i can find in credentials is accessToken. Can anybody help me? Thanks!

---

<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:** [September 28, 2017, 4:46pm UTC](https://community.auth0.com/t/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327/2 "2017-09-28T16:46:48Z")

</div>

There’s a lot in play here that adds friction to the overall flow. From one side, the latest and recommended flows in Auth0 enforce certain security requirements like the usage of RS256 for ID tokens issued to public clients. On the other side, the Graph.cool integration only supports HS256 tokens. On top of that you could argue that although ID tokens should be sent to Graph.cool as part of an authentication procedure that could lead to a signup of the user, then subsequent API call should use access tokens instead of ID tokens.

Due to the above you disabled OIDC which means you signal the intention to use the legacy flows (not recommended), but then are calling `renew` and `tokenExchange` which call into `/oauth/token` endpoint that does not have full interoperability with the legacy flows. This explain why the refresh token obtained through legacy flows does not really get you the expected response when you try to use it against that endpoint.

You could consider using the legacy approach to _refresh_ tokens through the delegation endpoint (if available to your tenant) which may answer your needs, however, this would not be recommended. If I were you I would also go through this GH [issue](https://github.com/graphcool/graphcool/issues/145) on the Graph.cool side of thing which was asking for support for RS256 and where there’s a few alternatives described around RS256 tokens and Schema Extensions.

---

<div class="post-metadata">

**Author:** ![witek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/witek/32/5170_2.png) [@witek](https://community.auth0.com/u/witek)\
**Post date:** [September 28, 2017, 9:02pm UTC](https://community.auth0.com/t/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327/3 "2017-09-28T21:02:58Z")

</div>

Thank you for your answer. If I will encounter any further problems I will let you know.

---

<div class="post-metadata">

**Author:** ![witek](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/witek/32/5170_2.png) [@witek](https://community.auth0.com/u/witek)\
**Post date:** [September 28, 2017, 9:02pm UTC](https://community.auth0.com/t/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327/4 "2017-09-28T21:02:58Z")

</div>

Thank you for your answer. If I will encounter any further problems I will let you know.

---

<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/i-cant-find-a-way-to-refresh-idtoken-with-refreshtoken-while-having-oidc-disabled/8327/5 "2018-03-02T05:56:43Z")

</div>


