Hi I have been working with twitter auth client as per online documentation about it on different site and I can made request to twitter and it gets back to me but its seem I am not able to login to the system and I can’t able to get Yii::$app->user->id it has no value when i print it.
But when print $checkLogin
$auth = Auth::find()->where([
'source' => $client->getId(),
'source_id' => $attributes['id'],
])->one();
if (Yii::$app->user->isGuest) {
if ($auth) { // login
$user = $auth->user;
$checkLogin = Yii::$app->user->login($user);
it gives me 1 so which means true and it means I am logged
So I am confused how do I get logged user Id and how do I check access control. Please do suggest as I can’t get any info in Yii::$app->user
Thank you waiting for kind response.