users-au / users-au-laravel-client
Users.au Laravel Client
Requires
- php: ^8.0
- illuminate/contracts: ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/database: ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/routing: ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/support: ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0
- socialiteproviders/usersau: ^1.1
Requires (Dev)
- phpunit/phpunit: ~5.0
This package is not auto-updated.
Last update: 2025-01-06 14:41:46 UTC
README
Introduction
This package is a Laravel client for Users.au oauth. It provides a simple way to integrate your Laravel application to log in with Users.au.
Installation
Requirements:
To get the latest version, simply run:
composer require users-au/users-au-laravel-client
Then do vendor publish:
php artisan vendor:publish --provider="Usersau\UsersauLaravelClient\UsersauLaravelClientServiceProvider"
Modify user model:
$this->fillable = [ ... 'usersau_id', 'usersau_access_token', 'usersau_refresh_token', ]; $this->hidden = [ ... 'usersau_id', 'usersau_access_token', 'usersau_refresh_token', ];
Add configuration to config/services.php
'usersau' => [ 'client_id' => env('USERSAU_CLIENT_ID'), 'client_secret' => env('USERSAU_CLIENT_SECRET'), 'redirect' => env('USERSAU_REDIRECT_URI'), 'host' => env('USERSAU_HOST'), ],
If you need to register the service provider manually. Open config/app.php
and add the following to the providers
array:
Usersau\UsersauLaravelClient\UsersauLaravelClientServiceProvider::class,
Run the migrations:
php artisan migrate
Configuration
Users.au Client ID and Secret
You will need to register your application with Users.au to receive a Client ID and Client Secret. You can do this at https://www.users.au.
Environment variables
You can set the following environment variables in your .env
file:
USERSAU_CLIENT_ID="your_client_id"
USERSAU_CLIENT_SECRET="your_client_secret"
USERSAU_REDIRECT_URI="https://www.yourdomain.com/auth/usersau/callback"
USERSAU_HOST="https://auth.youdomain.com"
TODO
- Add tests
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please feel free to fork this package and contribute by submitting a pull request to enhance the functionalities.
License
The MIT License (MIT). Please see License File for more information.