mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-09 21:42:57 +00:00
34 lines
813 B
PHP
34 lines
813 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Models\PersonalAccessToken;
|
|
use Illuminate\Support\Facades\Event;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Laravel\Sanctum\Sanctum;
|
|
use SocialiteProviders\Authentik\Provider as AuthentikProvider;
|
|
use SocialiteProviders\Manager\SocialiteWasCalled;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
Sanctum::usePersonalAccessTokenModel(PersonalAccessToken::class);
|
|
|
|
// Authentik
|
|
Event::listen(function (SocialiteWasCalled $event) {
|
|
$event->extendSocialite('authentik', AuthentikProvider::class);
|
|
});
|
|
}
|
|
}
|