PHP code example of symbiotic / auth-login

1. Go to this page and download the library: Download symbiotic/auth-login 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/ */

    

symbiotic / auth-login example snippets



// A section is added to the main array of the framework configuration
$config['auth'] =  [
    'users' =>[
        [
            'login' => 'admin_login',
            /** @see \Symbiotic\Auth\UserInterface::GROUP_ADMIN  and other groups **/
            'access_group' => \Symbiotic\Auth\UserInterface::GROUP_ADMIN, //admin
            // Password in https://www.php.net/manual/ru/function.password-hash.php
            // algo - PASSWORD_BCRYPT
            'password' => '$2y$10$fblGNBFYBjC9a3L6d0.lle1BoVFdMlMOzN6/NWjqBb8wFlJZt9P8C'//
        ]
    ],
    'base_login' => true, // enabling and disabling login authorization
];