Hello everyone.
I need to add SSO authentication to the project on YII 1. I have little experience in YII((
I would appreciate any advice on this topic? Thanks!

Hello everyone.
I need to add SSO authentication to the project on YII 1. I have little experience in YII((
I would appreciate any advice on this topic? Thanks!

Best modern solution.
Flow:
public function actionLogin(){ $code = $_GET['code'] ?? null; if (!$code) { header("Location: https://sso-server.com/auth"); exit; } $token = $this->getAccessToken($code); $userInfo = $this->getUserInfo($token); $user = User::model()->findByAttributes([ 'email' => $userInfo['email'] ]); if (!$user) { $user = new User(); $user->email = $userInfo['email']; $user->save(); } Yii::app()->user->id = $user->id; $this->redirect(['site/index']);}