Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kuma-guy/ray.auth0module
https://github.com/kuma-guy/ray.auth0module
Last synced: 8 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/kuma-guy/ray.auth0module
- Owner: kuma-guy
- License: mit
- Created: 2020-02-28T02:17:10.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-17T23:31:23.000Z (about 1 month ago)
- Last Synced: 2024-12-16T03:48:22.786Z (11 days ago)
- Language: PHP
- Homepage: https://packagist.org/packages/ray/auth0-module
- Size: 66.4 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ray.Auth0Module
## Installation
### Composer install
$ composer require ray/auth0-module
### Module install
```php
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'),
]));
}
}
```
## Usage```php
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,
]);
}
```See more at https://github.com/auth0/Auth0-PHP