Skip to content

Commit

Permalink
feat: oauth kakao api code만
Browse files Browse the repository at this point in the history
  • Loading branch information
200516bb committed Jul 24, 2023
1 parent 4f75737 commit 4693276
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion app/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,4 +322,26 @@ def post(self):
DeviceToken
"""
content = request.json
return UserService.update_device_token(content['device_token']), 200
return UserService.update_device_token(content['device_token']), 200


# @user.route('/oauth/url/<string:type>', methods=['GET'])
# class OauthUrl(Resource):
# @user.doc(responses={200: 'OK'})
# @user.doc(responses={400: 'Bad Request'})
# @user.doc(params={'type': 'kakao'})
# def get(self, type):
# """
# OAuth URL 가져오기
# """
# if type == 'kakao':
# return { 'url': "https://kauth.kakao.com/oauth/authorize?client_id=%s&redirect_uri=%s&response_type=code" \
# % (os.getenv('KAKAO_CLIENT_ID'), os.getenv('KAKAO_REDIRECT_URI'))}, 200

@user.route('/oauth/kakao', methods=['GET'])
class KakaoOauth(Resource):
@user.doc(responses={200: 'OK'})
@user.doc(responses={400: 'Bad Request'})
def get(self):
code = str(request.args.get('code'))
return { 'code': code }

0 comments on commit 4693276

Please sign in to comment.