Hybrid Auth 2.9 버전으로 카카오계정 로그인을 연동하고 있습니다.
Kakao Provider 는 아래 Github 에서 가져와서 사용을 했구요.
페이스북, 네이버는 정상적으로 잘 되는데 카카오만 이상 동작을 하네요.
authorize API로 코드 받아 오는건 확인 했구요.
사용자 토큰 요청 시 아래와 같은 오류가 발생합니다.
{“error”:“invalid_client”,“error_description”:“Bad client credentials”}
설정에서 사이트 도메인 적용, 리다이렉트 Path 도 넣어줬는데 왜그럴까요?
이거 때문에 반나절을 소모해버렸네요 ㅜㅜ
Kakao Provider 소스:
https://github.com/jinseokoh/additional-providers
해결하였습니다.
원인:
Client Secret 을 사용하도록 설정해놓고 진행을 했었는데
Github에 올라와있는 소스를 보니 Secret 을 사용하지 않더군요.
그 외에 email 필드가 누락되었고 이미 decode 된 데이터를 decode해서 생기는 오류도 있었고…
수정해서 Github에 올려 두었습니다.
필요하신분은 사용하세요. ^^
<?php
/**
* Copyright (c) 2014 Team TamedBitches.
* Written by Chuck JS. Oh <jinseokoh@hotmail.com>
* http://facebook.com/chuckoh
*
* Date: 11 10, 2014
* Time: 01:51 AM
*
* This program is free software. It comes without any warranty, to
* the extent permitted by applicable law. You can redistribute it
* and/or modify it under the terms of the Do What The Fuck You Want
* To Public License, Version 2, as published by Sam Hocevar. See
* http://www.wtfpl.net/txt/copying/ for more details.
*
*/
class Hybrid_Providers_Kakao extends Hybrid_Provider_Model_OAuth2
{
/**
This file has been truncated. show original
1개의 좋아요