# Auth0Client.LoginAsync() v4.x doesn't return refresh token in a C# WPF app

**URL:** <https://community.auth0.com/t/auth0client-loginasync-v4-x-doesnt-return-refresh-token-in-a-c-wpf-app/6248>\
**Category:** Get Help\
**Tags:** wpf, loginasync, c, refresh-tokens\
**Created:** [April 18, 2017, 7:20am UTC](https://community.auth0.com/t/auth0client-loginasync-v4-x-doesnt-return-refresh-token-in-a-c-wpf-app/6248 "2017-04-18T07:20:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![craig\_beebe](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/craig_beebe/32/10317_2.png) [@craig\_beebe](https://community.auth0.com/u/craig_beebe)\
**Post date:** [April 18, 2017, 7:20am UTC](https://community.auth0.com/t/auth0client-loginasync-v4-x-doesnt-return-refresh-token-in-a-c-wpf-app/6248/1 "2017-04-18T07:20:46Z")

</div>

Here’s my code:

```
var auth0 = new Auth0Client(
    Properties.Settings.Default.auth0Domain,
    Properties.Settings.Default.auth0ClientID);
var handle = new WindowInteropHelper(this).Handle;
var windowWrapper = new WindowWrapper(handle);

var user = await auth0.LoginAsync(
    owner: windowWrapper, 
    scope: "openid profile", 
    withRefreshToken: true);

```

The return value contains a null refresh token. I tried settings device to an arbitrary value, but that didn’t help. I recently switched from Auth0 v3.x to v4.x. Auth0 v3.x returned a refresh token. Did this break in v4.x? If not, what do I need to do to get a refresh token?

---

<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:53am UTC](https://community.auth0.com/t/auth0client-loginasync-v4-x-doesnt-return-refresh-token-in-a-c-wpf-app/6248/2 "2018-03-02T05:53:18Z")

</div>


