Uncaught Error: Class 'Auth0\SDK\Store\CookieStore' not found

I’m trying to pass url params via the /authorize endpoint. I found lots of helpful links and documentation that led me to this documentation for the Auth0 PHP SDK (https://auth0.com/docs/libraries/auth0-php/authentication-api) that would allow me to add params to the /authorize url (which I could then use to style a user who is signing up differently from a login on the Universal Login page).

I copied the code from the example (replacing the env variables as appropriate), but when I execute the code, I receive an error

Fatal error: Uncaught Error: Class ‘Auth0\SDK\Store\CookieStore’ not found

This seems to be something missing in my install of the SDK, which basically means a dead-end for me.

Any help or guidance would be much appreciated.

Thanks!

I found the issue. It looks like the PHP Quickstart needs to be updated.

The install command forces the user to use version ~5.0, but the current version is 7.2

composer require auth0/auth0-php:"~5.0"

This command is only shown on the PHP Quickstart page.

The proper command that doesn’t require a specific (and outdated) version is on the Auth0 PHP official page (which was not easy to find). https://auth0.com/docs/libraries/auth0-php

php composer.phar require auth0/auth0-php

Once I re-ran my Composer which updated to version 7.2, the CookieStore error was resolved, and the url worked correctly.

It may help to update the documentation for the Quickstart PHP. https://auth0.com/docs/quickstart/webapp/php

1 Like

I’ll relay that info to the team responsible for developing quickstarts.

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