Skip to content

Commit

Permalink
instagram 연결 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jhs512 committed Apr 28, 2023
1 parent de7fcf7 commit c0d77de
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/resources/application-secret.yml.default
Expand Up @@ -12,5 +12,8 @@ spring:
clientId: 'CLIENT ID'
client-secret: 'CLIENT PASSWORD'
facebook:
clientId: 'CLIENT ID'
client-secret: 'CLIENT PASSWORD'
instagram:
clientId: 'CLIENT ID'
client-secret: 'CLIENT PASSWORD'
12 changes: 12 additions & 0 deletions src/main/resources/application.yml
Expand Up @@ -41,6 +41,13 @@ spring:
redirect-uri: '{baseUrl}/{action}/oauth2/code/{registrationId}'
client-name: Facebook
scope:
instagram:
provider: instagram
scope: user_profile,user_media
client-name: Instagram
authorization-grant-type: authorization_code
redirect-uri: "{baseUrl}/login/oauth2/code/{registrationId}"
client-authentication-method: client_secret_post
provider:
kakao:
authorization-uri: https://kauth.kakao.com/oauth/authorize
Expand All @@ -52,6 +59,11 @@ spring:
token-uri: https://nid.naver.com/oauth2.0/token
user-info-uri: https://openapi.naver.com/v1/nid/me
user-name-attribute: response
instagram:
authorization-uri: https://api.instagram.com/oauth/authorize
token-uri: https://api.instagram.com/oauth/access_token
user-info-uri: https://graph.instagram.com/me?fields=id,username&access_token={access-token}
user-name-attribute: username
jpa:
hibernate:
ddl-auto: create
Expand Down
7 changes: 7 additions & 0 deletions src/main/resources/templates/usr/instaMember/connect.html
Expand Up @@ -102,6 +102,13 @@ <h1 class="mb-4">
<span>인스타 아이디 입력</span>
</button>
</form>

<div class="mt-4">
<a href="/oauth2/authorization/instagram" class="btn btn-block btn-outline gap-1">
<i class="fa-brands fa-instagram text-[color:#E1306C]"></i>
<span>인스타 아이디 연결</span>
</a>
</div>
</div>
</main>
</body>
Expand Down

0 comments on commit c0d77de

Please sign in to comment.