filsh / yii2-oauth2-server

A wrapper for implementing an OAuth2 Server(https://github.com/bshaffer/oauth2-server-php)
MIT License
332 stars 167 forks source link

Calling unknown method: filsh\yii2\oauth2server\Module::handleAuthorizeRequest() #129

Closed vitovtnet closed 4 years ago

vitovtnet commented 7 years ago

Calling unknown method: filsh\yii2\oauth2server\Module::handleAuthorizeRequest() In method

public function actionAuthorize() { if (Yii::$app->getUser()->getIsGuest()) return $this->redirect('login');
$module = \Yii::$app->getModule('oauth2'); $response = $module->handleAuthorizeRequest(!Yii::$app->getUser()->getIsGuest(), Yii::$app->getUser()->getId());

tahpot commented 7 years ago

I had this same problem because I used composer to require 2.0.1, however this repo has a tag 2.0.1 and a branch v2.0.1.

The branch has the handleAuthorizeRequest() method and is more recent than the version tagged as 2.0.1.

I solved this by forking the repo, creating a new 2.0.2 branch in my fork based off the 2.0.1 branch and the modifying composer to use my fork, instead of filsh.

You're welcome to use my fake 2.0.2 branch here: https://github.com/tahpot/yii2-oauth2-server/tree/v2.0.2

mtangoo commented 7 years ago

I solved this by forking the repo, creating a new 2.0.2 branch in my fork based off the 2.0.1 branch and the modifying composer to use my fork, instead of filsh.

I had created this fork that I wanted to maintain but didn't got attention. So I paused a bit! There is confusion in this module due to mucked branches. They are somehow confusing and sources of all these issues.

SmirnovMaxim commented 4 years ago

https://github.com/filsh/yii2-oauth2-server/issues/73#issuecomment-577708248

varp commented 4 years ago

Fixed in the v2.1.0. Also the code base between branches was synced.