refbytes / laravel-outseta
Integrate Outseta registration, login, and internal user creation with Laravel.
Fund package maintenance!
RefBytes
Requires
- php: ^8.4||^8.3
- firebase/php-jwt: ^6.10
- illuminate/contracts: ^12.0||^11.0||^10.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^3.1.0||^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0||^2.0
- pestphp/pest-plugin-arch: ^3.0||^2.0
- pestphp/pest-plugin-laravel: ^3.0||^2.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^2.0||^1.1
- phpstan/phpstan-phpunit: ^2.0||^1.3
- spatie/laravel-ray: ^1.35
README
This Laravel package integrates Outseta registration, login, and internal user creation with Laravel. It also includes a webhook configuration for receiving Outseta events.
Note
If you don't already have an account, you can register for a an Outseta account. This is an affiliate link that helps me keep the lights on.
Usage
In order to use this package, you'll need to have an Outseta account. Once you account is created, you can follow these steps to get started. A full integration guide is provided in the wiki.
Outseta Account
Copy the subdomain portion of your Outseta URL to OUTSETA_SUBDOMAIN
in your .env file. The subdomain can be copied from your browser's address bar. It can also be viewed and changed by going to Settings -> General -> Outseta URL.
Installation
You can install the package via composer:
composer require refbytes/laravel-outseta
The included migrations create an accounts table and adds an account_id column to your users table. If you need to customize the models used by this package you can specify them in the config file using .env
keys.
You can publish and run the migrations with:
php artisan vendor:publish --tag="outseta-migrations"
php artisan migrate
In order to integrate the Outseta Authentication, you need to add the Quick Start script to the header of every page. You can do this be adding the included component to the <head>
section of your layouts.
<x-outseta-quick-start-script />
There are a few configuration options that are required to be set up in your .env
file and several optional settings depending on your app:
OUTSETA_SUBDOMAIN= OUTSETA_PUBLIC_KEY= OUTSETA_WEBHOOK_KEY= OUTSETA_REDIRECT_AFTER_LOGIN= # default is /dashboard OUTSETA_REDIRECT_IF_NOT_SUBSCRIBED= # default is /
If you choose to, you can publish the config file with:
php artisan vendor:publish --tag="outseta-config"
Features
- Registration
- Authentication
- Subscription Checking
- Webhooks with Events
- Update Addon Usage
- Track Custom Activity
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
License
The MIT License (MIT). Please see License File for more information.