KatsuteDev/Mal4J

Redirect URI is missing from token request

Katsute opened this issue · 4 comments

Prerequisites

  • I have checked that no other similar issue already exists.
  • I have checked that this issue is actually a bug and not a feature.
  • I have checked the documentation.
  • I have checked the FAQ.
  • I am running the latest release version.

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

@sinon-bot branch redirect uri

New branch created redirect-uri@98a5a2f

This branch was created by @Katsute.

@sinon-bot branch redirect uri

New branch created redirect-uri@4445e12

This branch was created by @Katsute.