uafrica / oauth-server

OAuth Server
Other
51 stars 51 forks source link

Error: A route matching "array ( 'controller' => 'Users', 'action' => 'logout', 'plugin' => 'OAuthServer', '_ext' => NULL, )" could not be found. #11

Open davalb opened 9 years ago

davalb commented 9 years ago

I am trying to use the oauth-server with hello.js hello.js constructs this request:

http://wgputzplan-cake.dev/oauth/authorize?client_id=1&response_type=code&redirect_uri=http%3A%2F%2Fwgputzplan-mobile.dev%2F&display=popup&scope=&state={%22client_id%22%3A1%2C%22network%22%3A%22wgputzplan%22%2C%22display%22%3A%22popup%22%2C%22callback%22%3A%22_hellojs_6xgxzur9%22%2C%22state%22%3A%22%22%2C%22redirect_uri%22%3A%22http%3A%2F%2Fwgputzplan-mobile.dev%2F%22%2C%22scope%22%3A%22basic%22%2C%22oauth%22%3A{%22version%22%3A2%2C%22auth%22%3A%22http%3A%2F%2Fwgputzplan-cake.dev%2Foauth%2Fauthorize%22%2C%22grant%22%3A%22http%3A%2F%2Fwgputzplan-cake.dev%2Foauth%2Faccess_token%22}%2C%22oauth_proxy%22%3A%22https%3A%2F%2Fauth-server.herokuapp.com%2Fproxy%22}

The popup with the login screen opens as expected. After login however the authentication-page is not shown, but instead this error:

Error: A route matching "array ( 'controller' => 'Users', 'action' => 'logout', 'plugin' => 'OAuthServer', '_ext' => NULL, )" could not be found.

I don't understand why he is looking for that route in the first place?

Any help much appreciated. Thank you.

davalb commented 9 years ago

If I create a route like $routes->connect('/xyz', ['controller' => 'Users', 'action' => 'logout', 'plugin' => 'OAuthServer', '_ext' => NULL]); in routes.php the authorize-page is shown correctly, but it does not seem to make sense having to do this.

dakota commented 9 years ago

Strange since the plugin never tried to redirect to the logout action. Do you perhaps have a beforeFilter that is doing this?