Yii2: Authentication with Google and Facebook
This is continuation from https://takdekeje.kuceng.my/2018/08/yii2-validate-email-after-registration.html . Objective: Register and login with Google and Facebook account. Link existing account with Google and Facebook. Unlink existing account from Google and Facebook. You may truncate both tables to start fresh. Part 1: Initial setup Install AuthClient Extension . composer require "yiisoft/yii2-authclient:*" Create new migration to update DB yii migrate/create authclient Edit the migration file: <?php use yii\db\Migration; /** * Class m180926_083206_auth */ class m180926_083206_auth extends Migration { /** * {@inheritdoc} */ public function safeUp() { } /** * {@inheritdoc} */ public function safeDown() { echo "m180926_083206_auth cannot be reverted.\n"; return false; } // Use up()/down() to run migration code without a t...