# Can't refresh tokens which are from Device Auth Code

**URL:** <https://community.auth0.com/t/cant-refresh-tokens-which-are-from-device-auth-code/110117>\
**Category:** Get Help\
**Tags:** device-credentials, management-api\
**Created:** [June 27, 2023, 10:00pm UTC](https://community.auth0.com/t/cant-refresh-tokens-which-are-from-device-auth-code/110117 "2023-06-27T22:00:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![minsuk.kang.2970](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/minsuk.kang.2970/32/48376_2.png) [@minsuk.kang.2970](https://community.auth0.com/u/minsuk.kang.2970)\
**Post date:** [June 27, 2023, 10:00pm UTC](https://community.auth0.com/t/cant-refresh-tokens-which-are-from-device-auth-code/110117/1 "2023-06-27T22:00:16Z")

</div>

Hi there.  
I’m using a device code authorization (oauth/device/code) to allow log in to my application.  
While scanning device code from a second device, I poll the tokens on the first device and can successfully retrieve them. e.g. (grant\_type=urn:ietf:params:oauth:grant-type:device\_code&device\_code=$deviceCode&client\_id=$clientId)

Now the problem is when I try to refresh the tokens, I get the MFA error.

curl --request POST --url ‘[https://domain/oauth/token](https://domain/oauth/token)’ --header ‘content-type: application/x-www-form-urlencoded’ --data ‘grant\_type=refresh\_token’ –  
data ‘client\_id=$clientId’ --data ‘scope=openid profile email offline\_access’ --data ‘refresh\_token=$refreshToken’  
{“error”:“mfa\_required”,“error\_description”:“Multifactor authentication required”,“mfa\_token”:“blahblahblah”}

Could you please advice what I might be missing in order to successfully refresh the tokens?  
Auth0 I’m running on is an Android native application.

Thank you.

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [June 27, 2023, 10:15pm UTC](https://community.auth0.com/t/cant-refresh-tokens-which-are-from-device-auth-code/110117/3 "2023-06-27T22:15:00Z")

</div>

Hello there @minsuk.kang.2970 welcome to the community!

> [@minsuk.kang.2970](#):
>
> Could you please advice what I might be missing in order to successfully refresh the tokens?

You should be able to introduce an [Action](https://auth0.com/docs/customize/actions) to work around the requiring of MFA for refresh token exchanges - Please see the following:

[https://community.auth0.com/t/mfa-required-error-instead-of-using-refresh-token-with-actions/85058](https://community.auth0.com/t/mfa-required-error-instead-of-using-refresh-token-with-actions/85058)

Hope this helps!

---

<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:** [July 11, 2023, 10:15pm UTC](https://community.auth0.com/t/cant-refresh-tokens-which-are-from-device-auth-code/110117/4 "2023-07-11T22:15:55Z")

</div>

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