Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unsupported_grant_type #20

Open
5network opened this issue Dec 13, 2019 · 0 comments
Open

unsupported_grant_type #20

5network opened this issue Dec 13, 2019 · 0 comments

Comments

@5network
Copy link

Hello,

great api skeleton. But I got this error:

{
    "error": "unsupported_grant_type",
    "message": "The authorization grant type is not supported by the authorization server.",
    "hint": "Check the `grant_type` parameter"
}

in my oauth2.config.php i have:

return [
    'authentication' => [
        'private_key' => dirname(__DIR__) . '/../data/oauth2/private.key',
        'public_key' => dirname(__DIR__) . '/../data/oauth2/public.key',
        'encryption_key' => require dirname(__DIR__) . '/../data/oauth2/encryption.key',

        'access_token_expire' => 'P1D',
        'refresh_token_expire' => 'P1M',
        'auth_code_expire' => 'PT10M',

        'pdo' => [
	        'dsn' => '...',
        	'username' => '...',
        	'password' => '...',
        ],

        'grants' => [
            Grant\ClientCredentialsGrant::class => Grant\ClientCredentialsGrant::class,
            Grant\PasswordGrant::class => Grant\PasswordGrant::class,
            Grant\AuthCodeGrant::class => Grant\AuthCodeGrant::class,
            Grant\ImplicitGrant::class => Grant\ImplicitGrant::class,
            Grant\RefreshTokenGrant::class => Grant\RefreshTokenGrant::class,
        ],
    ],
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant