KatsuteDev / Mal4J

Java wrapper for the official MyAnimeList API
https://katsute.dev/product/mal4j
GNU General Public License v2.0
36 stars 4 forks source link

Redirect URI is missing from token request #249

Closed Katsute closed 3 years ago

Katsute commented 3 years ago

Prerequisites

Operating System

All

Java Runtime

Other

Java Version

All

Release Version

All

Issue

Token authorization is missing redirect_uri

https://github.com/Katsute/Mal4J/blob/98a5a2f666a881ddf6e83e127e944f50ab74335e/src/main/java/com/kttdevelopment/mal4j/MyAnimeListAuthenticationService.java#L39-L47

According to https://myanimelist.net/apiconfig/references/authorization#scheme-1-the-http-basic-authentication, request body should be:

client_id=YOUR_CLIENT_ID
&grant_type=authorization_code
&code=AUTHORIZATION_CODE
&redirect_uri=YOUR_REDIRECT_URI                 ← missing!
&code_verifier=YOUR_PKCE_CODE_VERIFIER

Issue identified by https://stackoverflow.com/questions/69686648/oauth2-authorization-to-my-anime-list-not-working

Code

No response

Katsute commented 3 years ago

@sinon-bot branch redirect uri

ghost commented 3 years ago

New branch created redirect-uri@98a5a2f

This branch was created by @Katsute.

Katsute commented 3 years ago

@sinon-bot branch redirect uri

ghost commented 3 years ago

New branch created redirect-uri@4445e12

This branch was created by @Katsute.