You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm successfully able to use this package for various social media providers. But the issue is that it stopped conventional login. I have troubleshot the issue and found that it is because of the common\models\User::findIdentity() method which gets used by both conventional as well as social media login:
For conventional login it should be like:
public static function findIdentity($userId) {
return static::findOne(['user_id' => $userId, 'status' => self::STATUS_ACTIVE]);
}
whereas for social login it should be like:
public static function findIdentity($userId) {
if (Yii::$app->getSession()->has('user-' . $userId)) {
return new self(Yii::$app->getSession()->get('user-' . $userId));
} else {
return isset(self::$users[$userId]) ? new self(self::$users[$userId]) : null;
}
}
So how can I make both working?
Thanks
The text was updated successfully, but these errors were encountered:
Hello,
I'm successfully able to use this package for various social media providers. But the issue is that it stopped conventional login. I have troubleshot the issue and found that it is because of the
common\models\User::findIdentity()
method which gets used by both conventional as well as social media login:For conventional login it should be like:
whereas for social login it should be like:
So how can I make both working?
Thanks
The text was updated successfully, but these errors were encountered: