kevinElken fda7fa2b85 feat: EK-744: 会员注册成功后,增加发送短信功能. 10 сар өмнө
..
src fda7fa2b85 feat: EK-744: 会员注册成功后,增加发送短信功能. 10 сар өмнө
.gitignore fda7fa2b85 feat: EK-744: 会员注册成功后,增加发送短信功能. 10 сар өмнө
README.md fda7fa2b85 feat: EK-744: 会员注册成功后,增加发送短信功能. 10 сар өмнө
composer.json fda7fa2b85 feat: EK-744: 会员注册成功后,增加发送短信功能. 10 сар өмнө

README.md

One Auth PHP SDK

How to Install the Package?

  • 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

How to Install the Package's Config File?

  • 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=
    

How to Start Using the "one_auth" Driver?

  • 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',
    ]
    
    ...