PHP code example of artisanpack-ui / security-advanced-auth

1. Go to this page and download the library: Download artisanpack-ui/security-advanced-auth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

artisanpack-ui / security-advanced-auth example snippets


use ArtisanPackUI\SecurityAdvancedAuth\Authentication\Social\SocialAuthManager;

app( SocialAuthManager::class )->registerProvider( 'google', [
    'client_id'     => env('GOOGLE_CLIENT_ID'),
    'client_secret' => env('GOOGLE_CLIENT_SECRET'),
    'redirect_uri'  => route('security-advanced-auth.social.callback', ['provider' => 'google']),
] );

use ArtisanPackUI\SecurityAdvancedAuth\Models\SsoConfiguration;

SsoConfiguration::create([
    'slug'       => 'corp-saml',
    'name'       => 'Corporate SAML',
    'type'       => 'saml',
    'config'     => [/* IdP-specific config */],
    'is_enabled' => true,
]);
bash
php artisan vendor:publish --tag=security-advanced-auth-config
bash
php artisan vendor:publish --tag=security-advanced-auth-views