How can I process request like http://localhost/mysite/web/index.php?r=site/auth?authclient=somerestapi?code=xxxxx
in SiteController?
I am trying to login to 3rd party rest api with OAuth2Client.
I am getting yii\base\InvalidRouteException: Unable to resolve the request: site/auth?authclient=somerestapi?code=xxxxx
in
class Controller extends Component implements ViewContextInterface
public function runAction($id, $params = []){
//$id="auth?authclient=somerestapi?code=xxxxxx" is here
Is it possible to have a generic action in SiteController? Currently I have
public function actionAuth($authclient){
...
}
why I can’t have
public function actionAuth()
to catch site/auth with any GET parameters?