/var/www/vhosts/nabawater/frontend/config
Edit: /var/www/vhosts/nabawater/frontend/config/main.php (4687B)
_userScopeKey('%s-frontend'),
'basePath' => dirname(__DIR__),
'bootstrap' => [
'log',
// CmsDynamicRoute::class
],
'controllerNamespace' => 'frontend\controllers',
'defaultRoute' => 'home',
// 'modules' => [
// 'user' => [
// 'class' => dektrium\user\Module::class # 'dektrium\user\Module',
// ]
// ],
'components' => [
'request' => [
'csrfParam' => _userScopeKey('_csrf-%s-frontend'),
'baseUrl' => ''
],
'user' => [
'identityClass' => User::class,
'loginUrl' => '/',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => _userScopeKey('_identity-%s-frontend'),
'httpOnly' => true
],
],
'session' => [
// this is the name of the session cookie used for login on the frontend
'name' => _userScopeKey('advanced-%s-frontend'),
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => FileTarget::class,
'levels' => ['error', 'warning'],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
/**
* Yii2 assets clear cache
* @link http://stackoverflow.com/a/26114551/5798881
*/
'assetManager' => [
'appendTimestamp' => true,
'linkAssets' => true,
'baseUrl' => '/frontend/web/assets'
],
'urlManager' => [
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'store' => 'home/store',
'signup' => 'page/signup',
'login' => 'user/login',
'logout' => 'user/logout',
'fb-callback' => 'user/fb-callback',
'order-payment/
' => 'payment/order-payment',
'order-success/' => 'payment/success',
'order-mobile-success/' => 'payment/mobile-success',
'order-failure/' => 'payment/failure',
'order-mobile-failure/' => 'payment/mobile-failure',
'product/' => 'item/view',
'page/' => 'page/faq',
'page/' => 'page/cms',
'product-list-normal-orders' => 'item',
'product-list-bulk-orders' => 'item/bulk-order',
'' => '/index',
'/' => '/view',
'//' => '/',
'//' => '/',
'/' => '/',
],
],
'authClientCollection' => [
'class' => \yii\authclient\Collection::class,
'httpClient' => [
'transport' => 'yii\httpclient\CurlTransport',
],
'clients' => [
'google' => [
'class' => 'yii\authclient\clients\Google',
'clientId' => '884945839339-9slce20gfmfbch8off82ivh8gavmnjd0.apps.googleusercontent.com',
'clientSecret' => 'r0cJMjEGOvoprIf2fyrThwvu',
//TODO: Have to find Alternate solution to set return url this is a temporary fix for return url
//'returnUrl'=> "https://{$_SERVER['HTTP_HOST']}/user/auth?authclient=google",
'returnUrl'=> "https://{$_SERVER['HTTP_HOST']}/user/auth?authclient=google",
//'returnUrl'=> 'http://tech.system.local.org:1021/user/auth?authclient=google',
],
// 'facebook' => [
// 'class' => 'yii\authclient\clients\Facebook',
// 'clientId' => '1846843075403980',
// 'clientSecret' => 'a9d2105434870c5aee3a72e6c323a1e5',
// ],
]
],
],
'params' => $params,
];