From 9ea324ad8519e7a0a06f8d0e8f56942298b02c3b Mon Sep 17 00:00:00 2001 From: Imani Manyara Date: Sat, 3 Oct 2026 15:13:25 -0400 Subject: [PATCH] Rename the quick start to Quick start guide and usage The README standard now splits the section into Getting started, the setup a fresh install needs before the first call, and Usage. Every command, tag and env key shown was checked against the package's own provider, config or CLI. --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fae4cd3..e25fcdb 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,25 @@ php artisan vendor:publish --tag=laranail::authkit-config See [installation](docs/installation.md) for the full walkthrough. -## Quick start +## Quick start guide and usage + +### Getting started + +1. The guard defaults to `web`. To use another one, set it in `.env`: + + ```env + AUTHKIT_GUARD=web + ``` + +2. Publish and run only the migrations for the features you enable: + + ```bash + php artisan vendor:publish --tag=laranail::authkit-passkey-migrations + php artisan vendor:publish --tag=laranail::authkit-two-factor-migrations + php artisan migrate + ``` + +### Usage ```php use Illuminate\Http\Request; @@ -65,6 +83,15 @@ public function store(Request $request, AttemptEmailPasswordLoginInterface $atte } ``` +Issue an API token instead of a session: + +```php +use Simtabi\Laranail\AuthKit\Contracts\IssueTokenForUserInterface; + +$token = app(IssueTokenForUserInterface::class)->execute($user, name: 'mobile'); +// $token->token — the plain-text token, shown once +``` + The full walkthrough is in [Getting started](docs/getting-started.md); everything else is in the [documentation index](#documentation). ## Documentation @@ -224,7 +251,7 @@ Social login is maintained in [`laranail/authkit-social-login`](https://github.c which extends this package. See its [social login guide](https://github.com/laranail/authkit-social-login/blob/main/docs/social-login.md) for installation, providers, routes, persistence, and account-linking behavior. -## Usage +## Usage ### Session login (web)