bshaffer / oauth2-server-php

A library for implementing an OAuth2 Server in php
http://bshaffer.github.io/oauth2-server-php-docs
MIT License
3.26k stars 950 forks source link

After creating User Credentials root Problem when calling refresh_token #1027

Closed lemonguy1117 closed 2 years ago

lemonguy1117 commented 2 years ago

Hello. There is a problem when issuing refresh_tokens after issuing it to User Credentials, how do I handle it? Your help would be greatly appreciated!

The problem is When Grant_types is first issued in the oauth_clients table, if it is successfully issued in password, When issuing a refresh_token, grant_types checks with a refresh_token value

{ "error": "unauthorized_client", "error_description": "The grant type is unauthorized for this client_id" }

An error occurs. oauth_clients값

Forced to the database INSERT INTO webbit.oauth_clients (client_id, client_secret, grant_types, scope) VALUES ('testclient2', 'testsecret', 'refresh_token', 'app'); I'll put in the data In the oauth_refresh_tokens table, If you force the client_id value of the root from db to testclient2 and call api, the token will be reissued normally. oauth_refresh_tokens테이블

api_ok