I’ve got the following code uploaded to an AWS ELB with nginx:
and I can login, logout but the callback fails systematically with the following error message:
Fatal error: Uncaught Auth0\SDK\Exception\StateException: Code exchange was unsuccessful; network error resulted in unfulfilled request in /var/app/current/vendor/auth0/auth0-php/src/Exception/StateException.php:73 Stack trace: #0 /var/app/current/vendor/auth0/auth0-php/src/Auth0.php(305): Auth0\SDK\Exception\StateException::failedCodeExchange() #1 /var/app/current/index.php(61): Auth0\SDK\Auth0->exchange(‘ROUTE_URL_CALLB…’) #2 [internal function]: {closure}() #3 /var/app/current/vendor/steampixel/simple-php-router/src/Steampixel/Route.php(103): call_user_func_array(Object(Closure), Array) #4 /var/app/current/index.php(75): Steampixel\Route::run(‘’) #5 {main} thrown in /var/app/current/vendor/auth0/auth0-php/src/Exception/StateException.php on line 73
You can try at https://portal.instabid.io
I think it’s because somehow I cannot figure out how to configure nginx to pass the code and state parameters to the callback route. I tried everything. Here’s the config I have right now:
location / {
try_files $uri $uri/ /index.php?$query_string;
gzip_static on;
}
as per
What do I do? I can’t see any docs to config auth0 properly on AWS ELBs
Thanks,
Julien.