jambtc/yii2-oauth-amazon

yii2 oauth Amazon Authorization Login

Installs: 49

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:yii2-extension

v1.0 2021-10-20 11:37 UTC

This package is auto-updated.

Last update: 2024-12-25 13:59:03 UTC


README

yii2 oauth Amazon Authorization Login

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist jambtc/yii2-oauth-amazon "*"

or add

"jambtc/yii2-oauth-amazon": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

use jambtc\oauthamazon\amazon;
$checkAmazonUrl = Url::to(['amazon/check-authorization']);

$clientId = Yii::$app->params['amazon.clientId'];
$clientSecret = Yii::$app->params['amazon.clientSecret'];

$lwa = new amazon($clientId, $clientSecret);

echo $lwa->setAmazonScript();
echo $lwa->loginButton($checkAmazonUrl);