Configuration
The publishable config file is config/sp-jwt-auth.php.
bash
php artisan vendor:publish --tag=sp-jwt-auth-configCore JWT
Important core keys:
guard: Laravel guard name, defaultapi.driver: guard driver, defaultsp-jwt.user_provider: Laravel user provider, defaultusers.issuer: JWT issuer claim.audience: optional JWT audience claim.algorithm: signing algorithm, defaultRS256.access_ttl_minutes: access JWT lifetime.refresh_ttl_days: refresh token lifetime.- Refresh tokens always rotate; reuse of a rotated token is handled by
reuse_detection. clock_skew_seconds: leeway (seconds) applied when validatingexp,nbfandiat.reuse_detection: action after refresh token reuse, defaultrevoke_session.
Signing Keys
keys.active_kid selects the signing key. keys.items stores active, previous, retired, or compromised keys.
Do not use APP_KEY as the JWT signing key.
Hash Keys
Refresh tokens, OTP codes, verification tokens, reset tokens, API keys, and OAuth secrets are stored as HMAC hashes. hash_keys.active_id selects the active hash key.
Optional Modules
Optional module sections:
mfafirst_factor_otptoken_endpointsemail_verificationpassword_resetapi_keysexternal_identitiesoauth_server
Each optional module can be enabled independently. Core JWT does not require their dependencies, migrations, or runtime paths for normal first-party auth.
Informational flags.
mfa.enabled,mfa.otp.enabled,email_verification.enabled,password_reset.enabled,api_keys.enabledandexternal_identities.enabledare reported bysp-jwt-auth:mcp/sp-jwt-auth:validatebut do not switch the services off; the services are available whenever their tables exist. Route-based modules (first_factor_otp,token_endpoints,oauth_server) are gated by theirenabledflag.api_keys.max_ttl_dayscaps key lifetime, and keys without an expiry getdefault_ttl_days(ormax_ttl_daysunlessallow_never_expiresis true).allowed_ipsaccepts single IPs and CIDR ranges (IPv4/IPv6); an empty list or an unknown request IP rejects the key.