Strapi_Kakao Oauth
1 min readSep 13, 2021
2021.09.13
구글 로그인 등 strapi가 제공하는 로그인을 할 경우, 링크보고 따라하면 됨.
Kakao Oauth
https://developers.kakao.com/ 들어가서 어플리케이션 생성
- 요약 정보 ⇒ 앱 키 ⇒ REST API 키
- 카카오 로그인 ⇒ 보안 ⇒ Client Secret
⇒ 이 두 키를 발급 받아 localhost:1337의 provider 부분에 나중에 넣어줘야 됨!
Redirect url은 http://localhost:1337/connect/kakao/callback 로 등록
Frontend
Backend(directory name is ‘api’)
Setting up the server url
Before setting up a provider, you need to specify the absolute url of your backend in server.js
.
To add a new provider on Strapi, you will need to perform changes onto the following files
이메일은 선택 사항이기 때문에, 유저가 동의를 하지 않으면 받아올 수 없는 정보이다. 그래서, 만약에 비동의할 시, email을 nickname을 이용해서 생성
Configure the new provider model onto database
localhost:1337 => Settings => Providers
kakao provider 생성되었고, kakao developers에서 발급받은 키들을 넣어줌.
References: