clientxcms / sso-pterodactyl
Allows clients from ClientXCMS login to their Pterodactyl account with a single redirect
Requires
- php: ^8.0|^8.1|^8.2|^8.3
- illuminate/support: ^10.0|^11.0
README
Laravel SSO
Laravel SSO is a package for implementing Single Sign-On (SSO) authorizations in your Laravel project. This package allows you to authorize users on a Laravel panel from another website.
Requirements
- PHP 8.0 or higher
- Laravel 10 or higher
Installation
To install the package, use Composer:
composer require clientxcms/sso-pterodactyl
Configuration
- Publish the configuration file by running the following command:
php artisan vendor:publish --tag=sso-clientxcms
This command will publish the config/sso-clientxcms.php file, where you can set the secret key for SSO authorization.
- Generate new SSO key
php artisan clientxcms:generate
- Clear the configuration cache to ensure the new settings are applied:
php artisan route:clear
- Add the SSO key to your
.env
file in your clientxcms application by adding the following line:
SSO_CLIENTXCMS_KEY{SERVER_ID}=your_secret_key_here
with {SERVER_ID}
being the ID of the server you want to connect to. For example, if your server ID is 1
, you would add:
SSO_CLIENTXCMS_KEY1=your_secret_key_here
If you are using Cloud platforms you can add metadata to your CLIENTXCMS server to set the SSO key:
Key: sso_key
Value: your_secret_key_here
4. You can now use the SSO key in your application to authenticate users.
Usage
- Generate a access token for using a GET request from your application
- Redirect the user to the SSO redirect with their token After being redirected to the /sso-login route, the user will be automatically authorized on the Laravel panel if their email address matches a record in the database.
Support
If you have any questions or issues, please create a new issue in the project repository on GitHub.
License
This project is licensed under the MIT License. See the LICENSE file for details.