auth0 / auth0-PHP

PHP SDK for Auth0 Authentication and Management APIs.
https://auth0.com/docs/libraries/auth0-php
MIT License
381 stars 210 forks source link

Error when i use $auth0->exchange in php #704

Closed Enyty closed 1 year ago

Enyty commented 1 year ago

Checklist

SDK Version

Other (specify below)

PHP Version

Other (specify below)

Description

Hello, I have a problem with the “$auth0->exchange(ROUTE_URL_CALLBACK)” function.

When I use it after login , it returns the following error: Uncaught Auth0\SDK\Exception\StateException: Missing code.

I’ve checked my URL and the code and the state are both there and it look likes good.

And also when i start it with this : php -S 127.0.0.1:3000 index.php Thats work and when i put it in my web server thats dont work and the error is back.

I use the version 8.3.1 of the SDK and the version 7.4.29 of php.

How can we reproduce this issue?

you just have to follow the quick start in a new php server