ramon / auth-modals
Redesigns Flarum's login, sign-up and forgot-password modals with a side panel (image + icon) and adds Login / Sign Up pill buttons to the header.
Fund package maintenance!
v2.0.3
2026-10-28 12:39 UTC
Requires
- php: ^8.3
- flarum/core: ^2.0.0
Requires (Dev)
- flarum/phpstan: ^2.0
- flarum/testing: ^2.0
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5 || ^12.5.22 || ^13.2.0
- roave/security-advisories: dev-latest
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-28 12:40:19 UTC
README
Auth Modals
Redesigns Flarum's login, sign-up and forgot-password modals with a custom side panel (background image + contextual icon), and optionally adds pill-shaped Log In / Sign Up buttons to the header for guests.
Features
- Side panel — Injected into the Log In, Sign Up and Forgot Password modals, with a contextual Font Awesome icon (lock / user-plus / envelope).
- Custom background image — Upload any image from the admin panel; rendered as a
coverbackground on the right-side panel. - Header buttons — Optional pill-shaped Log In / Sign Up buttons in the header secondary nav for guests, with an "or" separator.
- Colored-header aware — Buttons automatically swap to readable contrast when the forum uses a colored header.
- Dark mode — Styles included; borders and surfaces adapt to the active theme.
- Auto-save — Settings persist on every change; no submit button on the extension page.
Requirements
- Flarum
^2.0.0 - PHP
^8.3
Installation
composer require ramon/auth-modals php flarum cache:clear
Then enable Auth Modals under the Extensions page in the admin panel.
Updating
composer update ramon/auth-modals --with-dependencies php flarum cache:clear
Configuration
All settings are available in the admin panel under the Auth Modals extension:
| Setting | Description | Default |
|---|---|---|
| Modal background | Image rendered on the right-side panel of the auth modals | — |
| Header buttons | Show pill-shaped Log In / Sign Up buttons in the header for guests | false |
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST |
/api/auth-modals/image |
Upload the modal background image (admin only; JPEG, PNG, GIF, WebP or BMP up to 8 MB, saved as WebP) |
DELETE |
/api/auth-modals/image |
Remove the modal background image (admin only) |
Development
cd js
npm install
npm run build
composer install
composer test:setup
composer test
composer analyse:phpstan