-
Notifications
You must be signed in to change notification settings - Fork 13
Description
Bug description
Hi, I was trying to integrate KakaoOAuth2 and had to apply client_secret for the authentication. The provider(Kakao) says the client_secret for KakaoOauth2 is not mandatory but is recommended for the security purpose. Therefore, I set my application to use that.
Unfortunately, KakaoOauth2 does not work only when the client_secret is configured.
According to the official Kakao developer website, the client_secret
must be in the request body as query parameter when the application is configured to utilize client_secret. Otherwise, it returns unauthorization response.
I looked through the codes and found out that the client_secret is not in the query parameters when POST requesting the token end point.
Reproduction URL
No response
Reproduction steps
-
Add application at the Kakao Developer Website and configure the application to use
client_secret
as below
-
Send the request /oauth2/kakao/authorize
-
After step 3, I receieved the following error
{"detail":"(invalid_client) Bad client credentials"}
Screenshots
The original codes are as follows (fastapi_oauth2.core.py -> OAuth2Core:token_data
):
I guess the client_secret
should be in the oauth2_query_params
so that the variable content
can contain client_secret
as a query parameter.
After I changed the code to put client_secret inside the query params, the authentication process worked as normal.
Logs
No response
Browsers
No response
OS
No response
Metadata
Metadata
Assignees
Labels
Type
Projects
Status