> ## Documentation Index
> Fetch the complete documentation index at: https://studio.bjanczak.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Standalone accounts and mail

Studio has two authentication modes. The default is host authentication: use the
existing Laravel/Filament guard, principal model and profile resolver. No Studio
user table or Fortify setup is required in that mode.

For an independent Laravel installation, enable the optional standalone module:

1. Install `laravel/fortify:^1.42` and the package's required Spatie Permission v8.
2. Exclude `laravel/fortify` and `laravel/passkeys` from Laravel package discovery
   in the application's `extra.laravel.dont-discover`. Studio registers Fortify
   only when standalone mode is enabled. Do not enable this mode over an existing
   Fortify installation; reuse host authentication there instead.
3. Publish/apply the usual Studio core migrations, Spatie permission migrations,
   and `media-studio-auth-migrations`. Never run the optional account migration in
   an existing host application merely to connect its user model.
4. Configure:

```php theme={null}
'auth' => [
    'enabled' => true,
    'registration' => false, // Open registration is an explicit decision.
    'prefix' => 'studio/auth',
    'home' => 'studio',
],
```

5. Build/distribute the React assets under `packages/react/dist`, or adapt the
   bundled views to your deployment's asset publication. The optional provider
   serves the JS/CSS entry assets under `/studio/auth/assets`.
6. Create an initial account using `php artisan media-studio:account EMAIL --name=NAME`.
   Passwords are entered using hidden prompts, not command-line arguments.
7. Set your real HTTPS `APP_URL`, persistent `APP_KEY`, private database/cache,
   secure session cookies and working mail configuration. Run the application's
   normal scheduler/queue workers. Do not expose the loopback demo guard publicly.

The module provides HeroUI sign-in, registration, reset, verification and password
confirmation screens. Account security is available from the account menu. Its
TOTP setup requires recent password confirmation, verifies a code, encrypts the
secret/recovery codes and requires a challenge at later sign-ins. Passwords are
hashed; reset tokens are hashed, expire after 60 minutes and are single-use. Reset
requests have a generic response for existing and missing accounts. Login and
2FA attempts are rate limited; sessions are regenerated by native Fortify flows.

The default standalone tenant resolver gives each account an independent default
workspace. A team/organization installation must deliberately configure its own
`TenantResolver` and invitation/admission rules; changing the tenant model does
not migrate existing workspaces automatically. Registration grants Studio
operations within the registered account's authorized workspace boundaries;
workspace membership and server authorization still apply to every resource.

The standalone module is not enabled in the existing local demo because its
existing library belongs to the demo principal. Enabling a new user database is
not an implicit migration of that identity or its workspace memberships.

## SMTP and host mail integration

All Studio member/share invitations and standalone account emails use the same
mail selection. Default behavior preserves the host application's mailer:

```php theme={null}
'mail' => ['mode' => 'inherit'],
```

Use an already configured Laravel mailer without changing `mail.default`:

```php theme={null}
'mail' => ['mode' => 'mailer', 'mailer' => 'transactional'],
```

Or use isolated Studio SMTP:

```php theme={null}
'mail' => [
    'mode' => 'smtp',
    'from' => ['address' => env('FMS_MAIL_FROM_ADDRESS'), 'name' => 'Media Studio'],
    'smtp' => [
        'host' => env('FMS_SMTP_HOST'),
        'port' => (int) env('FMS_SMTP_PORT', 587),
        'scheme' => env('FMS_SMTP_SCHEME', 'smtp'), // smtp/STARTTLS or smtps/465
        'username' => env('FMS_SMTP_USERNAME'),
        'password' => env('FMS_SMTP_PASSWORD'),
    ],
],
```

Dedicated SMTP requires TLS, uses a bounded connection timeout and does not
change the host's default transport. Store credentials in deployment environment
secrets. Rebuild Laravel's config cache/restart long-lived workers after changing
them. No SMTP credentials are sent to the browser. Named mailers inherit their
host-defined security configuration. Actual delivery requires valid credentials,
DNS/sender setup and an accessible mail server; local automated tests use fakes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.