I’m implementing yii 2 rest api in my project, using Filsh/yii2-oauth2-server
But the problem is when i hit:
localhost/api/oauth2/token with Post request it gives me 404,
Here is my config file web.php
'modules' => [
'v1' => [
'class' => 'app\modules\v1\v1',
],
'oauth2' => [
'class' => 'filsh\yii2\oauth2server\Module',
'tokenParamName' => 'accessToken',
'tokenAccessLifetime' => 3600 * 24,
'storageMap' => [
'user_credentials' => 'app\models\User',
],
'grantTypes' => [
'user_credentials' => [
'class' => 'OAuth2\GrantType\UserCredentials',
],
'refresh_token' => [
'class' => 'OAuth2\GrantType\RefreshToken',
'always_issue_new_refresh_token' => true
]
]
],
],