You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having trouble integrating Kakao Login in my build with Next-Auth.
Everything seems to go through normally and I asked Kakao about not getting any information back except 'invalid_client (Bad client credentials)' Error but they say there has been no logs regarding my auth error.
It seems that the problem might be that Kakao only accepts Query String but instead I think I am sending data as FormData.
Their doc also specifies to send the data in application/x-www-form-urlencoded also. I'm confused and I would like to try sending it in QS if possible.
Any help would be appreciated greatly.
// api/auth/[...nextauth].ts
KakaoProvider({
clientId: process.env.KAKAO_API_KEY,
clientSecret: process.env.KAKAO_CLIENT_SECRET,
authorization: {
params: {
response_type: 'code',
scope: 'profile account_email gender age_range phone_number',
redirect_uri: 'http://localhost:3000/api/auth/callback/kakao',
},
},
}),
// from Kakao Documentation for getting authorization token
Request
https://kauth.kakao.com/oauth/authorize?response_type=code&client_id={REST_API_KEY}&redirect_uri={REDIRECT_URI}
// The way I am requesting
Payload -> FormData
csrfToken: some token
callbackUrl: some URL
json: true
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am having trouble integrating Kakao Login in my build with Next-Auth.
Everything seems to go through normally and I asked Kakao about not getting any information back except
'invalid_client (Bad client credentials)'
Error but they say there has been no logs regarding my auth error.It seems that the problem might be that Kakao only accepts Query String but instead I think I am sending data as FormData.
Their doc also specifies to send the data in
application/x-www-form-urlencoded
also. I'm confused and I would like to try sending it in QS if possible.Any help would be appreciated greatly.
Beta Was this translation helpful? Give feedback.
All reactions