|
|
10 сар өмнө | |
|---|---|---|
| .. | ||
| src | 10 сар өмнө | |
| .gitignore | 10 сар өмнө | |
| README.md | 10 сар өмнө | |
| composer.json | 10 сар өмнө | |
Add the following lines into repositories and require attributes.
{
"repositories": [
...
{
"type": "vcs",
"url": "https://github.com/ElkenGit/One-Auth-PHP-SDK"
}
]
...
"require": {
...
"elkengit/one-auth-php-sdk": "dev-master"
}
}
Run composer update
Execute the following command line
php artisan vendor:publish --provider="ElkenGit\OneAuthSDK\OneAuthSdkServiceProvider"
Check your config folder, one_auth.php has been created. We highly recommend you to delete the file and re-run
the command above just in case there is any new changes in the config file.
Look into the one_auth.php and add get the ENV keys and configure in your .env file. Following are the available
keys that should setup in your .env file.
##ONE AUTH SETTINGS-------------------------------------------------------------------------------------
ONE_AUTH_BASE_URL=
ONE_AUTH_CLIENT_ID=
ONE_AUTH_CLIENT_SECRET=
ONE_AUTH_CLIENT_PLATFORM=
Go to config/auth.php, look for guards array. Following example is we change the driver for auth:api
to start using one_auth driver.
...
'api' => [
'driver' => 'one_auth',
'provider' => 'users',
]
...