Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

No /oauth route exist #36

Closed
2 tasks done
mbourquin opened this issue Mar 23, 2018 · 1 comment · Fixed by #38
Closed
2 tasks done

No /oauth route exist #36

mbourquin opened this issue Mar 23, 2018 · 1 comment · Fixed by #38

Comments

@mbourquin
Copy link

mbourquin commented Mar 23, 2018

After configuring Expressive 3 and oauth2 (0.4.0) with the actual docs, when i make a request for token i got a 404 error.
I selected zend-servicemanager, FastRoute in the default config.

Code to reproduce the issue

http -f POST localhost:8080/oauth grant_type=password client_id=client_test username=user_test password=test

HTTP/1.1 404 Not Found
Connection: close
Content-type: text/html; charset=UTF-8
Date: Fri, 23 Mar 2018 15:28:03 +0100
Host: localhost:8080
X-Powered-By: PHP/7.1.15-1+ubuntu16.04.1+deb.sury.org+2

Cannot POST http://localhost:8080/oauth

Expected results

JWT token

If i manually add a route in routes.php file, it is fine!

$app->route('/oauth', Zend\Expressive\Authentication\OAuth2\OAuth2Middleware::class, ['GET', 'POST'], 'oauth');

@ezimuel
Copy link
Contributor

ezimuel commented Mar 27, 2018

@mbourquin you right, we need to add this route manually as you suggested. I'm fixing the documentation. Thanks!

ezimuel added a commit that referenced this issue Apr 4, 2018
Fix for #36, added the /oauth route in docs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants