ids / login
IDS authentication package
Requires
- php: ^8.2
- giggsey/libphonenumber-for-php-lite: ^8.0 || ^9.0
- guzzlehttp/guzzle: ^7.0
- pusher/pusher-php-server: ^7.0
Requires (Dev)
- orchestra/testbench: ^9.0|^10.0
- phpunit/phpunit: ^11.0
Suggests
- livewire/livewire: Required for Livewire view mode (^3.0)
- dev-master
- v4.0.31
- v4.0.30
- v4.0.29
- v4.0.28
- v4.0.27
- v4.0.26
- v4.0.25
- v4.0.24
- v4.0.23
- v4.0.22
- v4.0.21
- v4.0.20
- v4.0.19
- v4.0.18
- v4.0.17
- v4.0.16
- v4.0.15
- v4.0.14
- v4.0.13
- v4.0.12
- v4.0.11
- v4.0.10
- v4.0.9
- v4.0.8
- v4.0.7
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.4.48
- v3.4.47
- v3.4.46
- v3.4.45
- v3.4.44
- v3.4.43
- v3.4.42
- v3.4.41
- v3.4.40
- v3.4.39
- v3.4.38
- v3.4.37
- v3.4.36
- v3.4.35
- v3.4.34
- v3.4.33
- v3.4.32
- v3.4.31
- v3.4.30
- v3.4.29
- v3.4.28
- v3.4.27
- v3.4.26
- v3.4.25
- v3.4.24
- v3.4.23
- v3.4.22
- v3.4.21
- v3.4.20
- v3.4.18
- v3.4.17
- v3.4.16
- v3.4.15
- v3.4.14
- v3.4.13
- v3.4.12
- v3.4.11
- v3.4.10
- v3.4.9
- v3.4.8
- v3.4.7
- v3.4.6
- v3.4.5
- v3.4.4
- v3.4.3
- v3.4.2
- v3.4.1
- v3.4.0
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.27
- v3.0.25
- v3.0.23
- v3.0.21
- v3.0.20
- v3.0.19
- v3.0.18
- v3.0.17
- v3.0.16
- v3.0.15
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- 3.0.2
- 3.0.1
- v3.0
- dev-dev_v4
- dev-dev
- dev-dev-daniel
- dev-dev_satrya
- dev-dev-rezha
This package is auto-updated.
Last update: 2026-03-26 02:48:06 UTC
README
Laravel authentication package for IDS (Identity Service). Provides login, registration, QR code authentication, account management, and UI customization — all backed by the IDS API.
Requires: PHP 8.2+ | Laravel 11 or 12
Installation
composer require ids/login
Then run the interactive setup wizard:
php artisan ids:install
This will prompt you for your IDS credentials, feature preferences, and automatically configure your .env, publish config/migrations/assets, and run migrations.
Manual Installation
If you prefer manual setup:
# Publish config
php artisan vendor:publish --tag=ids-login-config
# Publish migrations
php artisan vendor:publish --tag=ids-login-migrations
# Publish assets (CSS, JS, phone input plugin)
php artisan vendor:publish --tag=ids-login-assets
# Run migrations
php artisan migrate
Configuration
After installation, configure via .env:
# Required
IDS_HOST=https://your-ids-server.com
IDS_UDID=your-udid
IDS_PASSWORD_CLIENT_ID=your-client-id
IDS_PASSWORD_SECRET=your-client-secret
IDS_CLIENT_CREDENTIAL_CLIENT_ID=your-cc-client-id
IDS_CLIENT_CREDENTIAL_SECRET=your-cc-secret
IDS_LOGIN_REDIRECT_TO=/home
# Feature Flags (all optional)
IDS_QR_LOGIN_ENABLED=true
IDS_ACCOUNT_ENABLED=true
IDS_USE_LIVEWIRE=false
IDS_RECAPTCHA_ENABLED=false
IDS_LOGIN_RESTRICTED=false
IDS_LOGIN_ALLOW_LOCAL_AUTH=false
# QR Login (required if QR enabled)
IDS_QR_REDIRECT_ID=your-redirect-id
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=ap1
# Recaptcha (required if recaptcha enabled)
RECAPTCHA_SITE_KEY=
RECAPTCHA_SECRET_KEY=
Full configuration reference: config/ids-login.php
Features
Authentication
- Password login via IDS OAuth (password grant)
- QR code login via Pusher real-time events (toggleable)
- Local auth fallback when IDS server is unreachable
- Phone verification post-login flow
- Registration with OTP verification
- Password reset with OTP verification
- Recaptcha support (toggleable)
Account Management (toggleable)
- Update display name, email, phone, password, language, avatar
- OTP verification for email and phone changes
- Profile picture upload
UI Customization
- Database-driven settings via
/ids-settings - Custom logo, background, primary color, dark mode
- Configurable layout alignment
Multi-Tenancy
Supports Stancl Tenancy with two modes:
# In config/ids-login.php
'tenancy' => [
'enabled' => true,
'mode' => 'multi_db', // or 'single_db'
'middleware' => ['tenant'],
],
- multi_db — separate database per tenant (publish tenant migrations)
- single_db — shared database with
tenant_idcolumn scoping
Views
Ships with Blade views (default) and optional Livewire components.
Blade (default)
Works out of the box. Vanilla JS, no jQuery. To customize:
php artisan vendor:publish --tag=ids-login-views
Livewire (opt-in)
Set IDS_USE_LIVEWIRE=true in .env. Requires livewire/livewire ^3.0:
composer require livewire/livewire
Components: ids-login-form, ids-register-form, ids-forgot-password-form, ids-account-manager
Routes
All routes are prefixed with ids.:
| Name | Method | URI |
|---|---|---|
ids.login | GET | /login |
ids.login.submit | POST | /login |
ids.logout | POST | /logout |
ids.register | GET | /register |
ids.register.submit | POST | /register |
ids.register.otp | GET | /register/otp |
ids.register.verify-otp | POST | /register/verify-otp |
ids.password.request | GET | /password/reset |
ids.password.otp | POST | /password/reset/otp |
ids.password.reset | POST | /password/reset |
ids.phone.verify | GET | /phone-verification |
ids.qr.callback | POST | /qr-login/callback |
ids.qr.status | GET | /qr-login/status |
ids.account | GET | /my-account |
ids.account.name | POST | /account/name |
ids.account.phone | POST | /account/phone |
ids.account.email | POST | /account/email |
ids.account.password | POST | /account/password |
ids.account.language | POST | /account/language |
ids.account.avatar | POST | /account/avatar |
ids.settings | GET | /ids-settings |
ids.settings.store | POST | /ids-settings |
QR and Account routes are only registered when their feature flags are enabled.
User Model
The package adds these columns to your users table:
| Column | Type | Description |
|---|---|---|
ids_id | string | IDS system user ID |
ids_hash | string | Encrypted IDS identifier |
phone_no | string | Full phone number with country code (e.g. +60129718420) |
country_code | string | Country code (e.g. +60) |
country_phone_no | string | Local phone number without country code (e.g. 129718420) |
is_active | boolean | User active status |
Configure column mapping in config/ids-login.php under attributes if your column names differ.
Updating
composer update ids/login
php artisan ids:update
Translations
Supports English, Malay (ms), and Chinese (zh). Publish to customize:
php artisan vendor:publish --tag=ids-login-translations
Upgrading from v3
See the Migration Guide in the design spec.
Key breaking changes:
- PHP 8.2+ required (was 8.1+)
- Config keys restructured (run
php artisan ids:installto regenerate) - Route names now prefixed with
ids. - Account routes changed from
/ajax/update/*to/account/* - jQuery removed — views use vanilla JS
- All vplus references removed
License
Proprietary - IDS