Hi,
I followed this tutorial on having an MFA with login.
Now after following all the steps i have an issue.
Invalid Call – yii\base\InvalidCallException
Current user is guest, can not render qr code!
1. in C:\xampp\htdocs\Schoolproject\vendor\vxm\yii2-mfa\src\QrCodeWidget.phpat line 80
7172737475767778798081828384 if ($this->image) {
$params['image'] = $this->image;
}
$uri = $this->user->getQrCodeUri($params);
if ($uri) {
return Html::img($uri, $this->options);
} else {
throw new InvalidCallException('Current user is guest, can not render qr code!');
}
}
}
On the bottom of the tutorial it says
Notice: when use this widget ensure user had been logged in, if not an
yii\base\InvalidCallException
will be throw.
But im a bit confused on how to fix this then, because i cant even log in now without fixing this.