List of steps to reproduce (step by step, including full links if applicable):
- Request a new OAuth client (using https://meta.wikimedia.org/wiki/Special:OAuthConsumerRegistration/propose)
- Choose OAuth2
- Leave the default values for the field "Allowed OAuth2 grant types"
- Submit the client (fill up callback url, etc.)
- Get it approved
What happens?:
The client has no right to authorize a token
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://meta.wikimedia.org/w/rest.php/oauth2/access_token
From the database, it seems that the grant types got populated empty:
mysql:root@localhost [metawiki]> select oarc_oauth2_allowed_grants from oauth_registered_consumer where oarc_consumer_key = '0248bad72bec4d2847f2ef3a39ac77b4'; +----------------------------+ | oarc_oauth2_allowed_grants | +----------------------------+ | [] | +----------------------------+ 1 row in set (0.000 sec)
What should have happened instead?:
The grants types should be the ones displayed:
When deselecting and selecting again the grant types, the values get populated, for example:
mysql:root@localhost [metawiki]> select oarc_oauth2_allowed_grants from oauth_registered_consumer where oarc_consumer_key = 'a0652706e2e016875fe831599e0c15ed'; +----------------------------------------+ | oarc_oauth2_allowed_grants | +----------------------------------------+ | ["authorization_code","refresh_token"] | +----------------------------------------+ 1 row in set (0.001 sec)
Software version (if not a Wikimedia wiki), browser information, screenshots, other information, etc:
