laravel / sanctum

Laravel Sanctum provides a featherweight authentication system for SPAs and simple APIs.
https://laravel.com/docs/sanctum
MIT License
2.74k stars 294 forks source link

Sanctum configuration value missing #492

Closed ninjaparade closed 8 months ago

ninjaparade commented 8 months ago

Issue

in the SanctumServiceProvider, the route prefix for sanctum is used from the config value ('sanctum.prefix') but that value is not actually in the config file.

Solution

Users are unable to find the value in the config, although adding it is simple, it would make sense to provide all configuration values with their defaults in the published config file for ease of use and better DX.

this PR adds that value so customization can be done with less confusion.

https://github.com/laravel/sanctum/blob/02ceac431eb99e7cf1d863e3fc4d3e72750cc720/src/SanctumServiceProvider.php#L86C43-L86C57

TODO

taylorotwell commented 8 months ago

I personally don't really think this should be changed, so I didn't expose it in the configuration file.