You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When updating to Laravel 11, if you remove the app config file but leave the sanctum file the call to Sanctum::currentApplicationUrlWithPort() will cause the underlying fetch of config('app.url') will result in a null value being returned.
So far I have found 2 workarounds:
Remove the sanctum.php or at least remove the definition of stateful from the file.
Make sure to define the SANCTUM_STATEFUL_DOMAINS in the env file.
Steps To Reproduce
Upgrade from Laravel 10 to Laravel 11.
Remove the app.php config file (If you use Laravel Shift, this is done for you)
Try opening the app using stateful domains without defining SANCTUM_STATEFUL_DOMAINS in the .env file
The text was updated successfully, but these errors were encountered:
Sanctum Version
4.0.0
Laravel Version
11.0.7
PHP Version
8.2
Database Driver & Version
MySQL
Description
When updating to Laravel 11, if you remove the app config file but leave the sanctum file the call to
Sanctum::currentApplicationUrlWithPort()
will cause the underlying fetch ofconfig('app.url')
will result in a null value being returned.So far I have found 2 workarounds:
stateful
from the file.SANCTUM_STATEFUL_DOMAINS
in the env file.Steps To Reproduce
SANCTUM_STATEFUL_DOMAINS
in the.env
fileThe text was updated successfully, but these errors were encountered: