protected function defaultReturnUrl()
    {
        $params = $_GET;

        // check for matching state
        if (!empty($params['state']) && $params['state'] !== $this->state) {
            throw new Exception("State does not match");
        }

        unset($params['code']);
        unset($params['state']);
        $params[0] = Yii::$app->controller->getRoute();

        return Yii::$app->getUrlManager()->createAbsoluteUrl($params);
    }
protected function defaultReturnUrl()
    {
        $params = $_GET;

        // check for matching state
        if (!empty($params['state']) && $params['state'] !== $this->state) {
            throw new Exception("State does not match");
        }

        unset($params['code']);
        unset($params['state']);
        $params[0] = Yii::$app->controller->getRoute();

        return Yii::$app->getUrlManager()->createAbsoluteUrl($params);
    }
protected function defaultReturnUrl ( ) { $ params = $ _GET ; // check for matching state if ( ! empty ( $ params [ 'state' ] ) && $ params [ 'state' ] !== $ this -> state ) { throw new Exception ( "State does not match" ) ; } unset ( $ params [ 'code' ] ) ; unset ( $ params [ 'state' ] ) ; $ params [ 0 ] = Yii :: $ app -> controller -> getRoute ( ) ; return Yii :: $ app -> getUrlManager ( ) -> createAbsoluteUrl ( $ params ) ; }
Check matching "state" and remove from params so that return uri will match
the one set in the Reddit app
@inheritdoc
Check matching state and remove from params so that return uri will match the one set in the Reddit app