1. Go to this page and download the library: Download ray/auth0-module 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/ */
ray / auth0-module example snippets
use Ray\Di\AbstractModule;
use Ray\Auth0Module\Auth0Module;
class AppModule extends AbstractModule
{
protected function configure()
{
$this->install(new Auth0Module([
'domain' => getenv('AUTH0_DOMAIN'),
'clientId' => getenv('AUTH0_MANAGEMENT_CLIENT_ID'),
'clientSecret' => getenv('AUTH0_MANAGEMENT_CLIENT_SECRET'),
'cookieSecret' => getenv('AUTH0_MANAGEMENT_COOKIE_SECRET'),
]));
}
}
class User extends ResourceObject
{
public function __construct() {
private Management $managementClient;
}()
public function onPost(): static
{
// ....
$this->managementClient->users()->create([
'connection' => CONNECTION_NAME,
'email' => $email,
'email_verified' => true,
'name' => $name,
'password' => $initialPassword,
]);
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.