# Migrating from PHP SDK 7 to 8 - session not persisting?

**URL:** <https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028>\
**Category:** Get Help\
**Tags:** php, login, auth0\
**Created:** [January 26, 2023, 3:02pm UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028 "2023-01-26T15:02:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ian.wild](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ian.wild/32/42673_2.png) [@ian.wild](https://community.auth0.com/u/ian.wild)\
**Post date:** [January 26, 2023, 3:02pm UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028/1 "2023-01-26T15:02:18Z")

</div>

Hi to everyone! I’m currently (successfully) using version 7 of the Auth0 PHP SDK to implement single sign on. I’m using the Authentication class directly so that I can manage each step of the authentication flow. Once the authentication flow has completed, I then access the user details by creating a new instance of the Auth0 class (with the appropriate client details). However, when testing the same using version 8 of the SDK the cookie store is empty and the ‘state’ variable is null. We’ve tried modifying the cookie settings but without any joy. I’ve been working through the documentation checking that we’ve updating our cookie settings appropriately but, try as we might, we can’t seem to get user details to persist between executing the authentication flow using the Authentication class and instantiating an Auth0 class. Is there something we’re missing? As I say, it works fine with v7 of the SDK but there’s something we’re not doing in v8.

Hope all this makes sense and thanks in advance.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 27, 2023, 8:27am UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028/2 "2023-01-27T08:27:50Z")

</div>

Hey there!

@evansims would you be able to help us on that front as you are our PHP guru here? 🙏

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [January 30, 2023, 9:30am UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028/3 "2023-01-30T09:30:32Z")

</div>

I talked with Evan and he told me that he’ll be happy to help if you can only raise it as a GitHub issue here:

> **[GitHub - auth0/auth0-PHP: PHP SDK for Auth0 Authentication and Management APIs.](https://github.com/auth0/auth0-PHP)**
>
> PHP SDK for Auth0 Authentication and Management APIs. - GitHub - auth0/auth0-PHP: PHP SDK for Auth0 Authentication and Management APIs.

---

<div class="post-metadata">

**Author:** ![ian.wild](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ian.wild/32/42673_2.png) [@ian.wild](https://community.auth0.com/u/ian.wild)\
**Post date:** [February 1, 2023, 1:12pm UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028/5 "2023-02-01T13:12:54Z")

</div>

Many thanks for your help with this. I have opened a new issue here: [Migrating from PHP SDK 7 to 8 - session not persisting · Issue #703 · auth0/auth0-PHP · GitHub](https://github.com/auth0/auth0-PHP/issues/703)

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [February 2, 2023, 2:49pm UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028/6 "2023-02-02T14:49:29Z")

</div>

Perfect thanks! I’ll ping the repo maintainers in a few minutes!

---

<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 16, 2023, 2:49pm UTC](https://community.auth0.com/t/migrating-from-php-sdk-7-to-8-session-not-persisting/99028/7 "2023-02-16T14:49:34Z")

</div>

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