#Sneeze - a fully headless Laravel Auth starter kit

9 messages · Page 1 of 1 (latest)

latent hearth
#

https://github.com/BoilingSoup/sneeze

I just published a composer package inspired by Breeze, but it uses Sanctum API tokens as the authentication mechanism.

This means you can use any kind of frontend to access Laravel's full auth system. Essentially a fully headless starter kit.

In a new Laravel project run:
composer require boilingsoup/sneeze
php artisan sneeze:install

All files are copied to your project to allow full customization.

README has all the details

GitHub

Built during allergy season — a different take on Laravel auth using Sanctum tokens and verification codes. - BoilingSoup/sneeze

#

php artisan sneeze:install --pest
If you use Pest

latent hearth
#

Sneeze - a fully headless Laravel Auth starter kit

distant turret
#

In the config you're using a closure returning now()->addMonths(1), I'd suggest to use CarbonInterval (https://carbon.nesbot.com/docs/#api-interval)
That way you can just use 'sanctum_auth_token_expiration' => CarbonInterval::months(1), so it doesn't depend on the current time

latent hearth
#

Good idea

#

It will need to depend on the current time eventually but the now() could go in the controller. I'll think about it

distant turret
#

No I get that it would be the current time. But my point is more, that would be done at the time of creating a token and all that. In the config you'd just want to specify the period of how long it's valid.

latent hearth
#

I took your suggestion thanks