# Php-sdk: no refresh token in auth payload

**URL:** <https://community.auth0.com/t/php-sdk-no-refresh-token-in-auth-payload/76466>\
**Category:** Get Help\
**Tags:** password, refresh-token, login\
**Created:** [January 15, 2022, 9:26am UTC](https://community.auth0.com/t/php-sdk-no-refresh-token-in-auth-payload/76466 "2022-01-15T09:26:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![argo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/argo/32/24230_2.png) [@argo](https://community.auth0.com/u/argo)\
**Post date:** [January 15, 2022, 9:26am UTC](https://community.auth0.com/t/php-sdk-no-refresh-token-in-auth-payload/76466/1 "2022-01-15T09:26:03Z")

</div>

Hi.

Using the php sdk, within a M2M application, I am using an authentication client to login newly created users from within some CMS. I am basically creating them using the same login and password on auth0, then logging them in.

The password grant type/password flow is enabled on the app/client, as well as the refresh token flow. The app itself has access to the management api for all actions related to `users` and `users_app_metadata`.

The app is reported as OIDC-compliant, and rules don’t appear to be interfering with the authentication flow.

The login request is issued as follows:

```auto
  public function login_user(string $email, string $password)
  {
    return $this->_run_op(function ($arg) {
      return $this->authentication_client->login(
        $arg['username'],
        $arg['password'],
        $this->realm,
        ['scope' => 'openid profile email offline_access', 'audience' => $this->audience],
      );
    }, ['username' => $email, 'password' => $password]);
  }

```

This works fine on another tenant, but it doesn’t return a refresh token at all on this one. There isn’t anything amiss in the logs. Only reports of successful exchanges.

Please advise.

---

<div class="post-metadata">

**Author:** ![argo](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/argo/32/24230_2.png) [@argo](https://community.auth0.com/u/argo)\
**Post date:** [January 17, 2022, 6:39am UTC](https://community.auth0.com/t/php-sdk-no-refresh-token-in-auth-payload/76466/2 "2022-01-17T06:39:43Z")

</div>

Solved. Offline access was simply disabled on the companion API.

---

<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:** [February 1, 2022, 6:39am UTC](https://community.auth0.com/t/php-sdk-no-refresh-token-in-auth-payload/76466/3 "2022-02-01T06:39:59Z")

</div>

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