Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SpringBoot/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ spring.ai.openai.chat.options.model=gpt-3.5-turbo
spring.security.oauth2.client.registration.kakao.client-id=${KAKAO_CLIENT_ID}
spring.security.oauth2.client.registration.kakao.client-secret=${KAKAO_CLIENT_SECRET}
spring.security.oauth2.client.registration.kakao.client-authentication-method=client_secret_post
spring.security.oauth2.client.registration.kakao.redirect-uri=https://api.likelionnews.click/login/oauth2/code/kakao
spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ’‘ Verification agent

❓ Verification inconclusive

BASE_URL λ―Έμ„€μ •β€§μŠ¬λž˜μ‹œ 쀑볡 μ‹œ λŸ°νƒ€μž„ 였λ₯˜ κ°€λŠ₯μ„± – κΈ°λ³Έκ°’ 및 μ •κ·œν™” κ³ λ € ν•„μš”
redirect-uri 값에 ${BASE_URL} ν”Œλ ˆμ΄μŠ€ν™€λ”λ₯Ό 직접 μ‚½μž…ν•˜λ©΄

  1. BASE_URL이 μ„€μ •λ˜μ§€ μ•Šμ€ ν”„λ‘œνŒŒμΌμ—μ„œ Spring λΆ€νŒ… λ‹¨κ³„μ—μ„œ placeholder not resolved μ˜ˆμ™Έκ°€ λ°œμƒν•  수 있고,
  2. BASE_URL에 /둜 λλ‚˜λŠ” 값이 λ“€μ–΄μ˜€λ©΄ //login/oauth2... ν˜•νƒœλ‘œ 쀑볡 μŠ¬λž˜μ‹œκ°€ μƒμ„±λ©λ‹ˆλ‹€.

λ‹€μŒκ³Ό 같이 κΈ°λ³Έκ°’κ³Ό ν›„ν–‰ μŠ¬λž˜μ‹œ 제거λ₯Ό ν¬ν•¨ν•œ ν‘œν˜„μ‹μ„ ꢌμž₯ν•©λ‹ˆλ‹€.

-spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao
+spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL:https://api.likelionnews.click}/login/oauth2/code/kakao

λ˜λŠ” BASE_URL 값을 μ„€μ •ν•  λ•Œ ν›„ν–‰ μŠ¬λž˜μ‹œλ₯Ό μ œκ±°ν•˜λ„λ‘ λ¬Έμ„œν™”ν•˜μ„Έμš”.
적용 μ „/ν›„ ν™˜κ²½λ³„ λΆ€νŒ… ν…ŒμŠ€νŠΈλ₯Ό ν•œ 번 더 확인해 μ£Όμ„Έμš”.


BASE_URL λ―Έμ„€μ • 및 μŠ¬λž˜μ‹œ 쀑볡 문제 – κΈ°λ³Έκ°’ μ„€μ •κ³Ό μ •κ·œν™” ν•„μš”

문제 μš”μ•½:

  • BASE_URL이 μ„€μ •λ˜μ§€ μ•Šμ€ ν”„λ‘œνŒŒμΌμ—μ„œ Spring λΆ€νŒ… μ‹œ placeholder not resolved μ˜ˆμ™Έ λ°œμƒ κ°€λŠ₯
  • BASE_URL 끝에 μŠ¬λž˜μ‹œ(/)κ°€ ν¬ν•¨λ˜λ©΄ //login/oauth2… ν˜•νƒœλ‘œ 쀑볡 μŠ¬λž˜μ‹œ 생성

ꢌμž₯ μˆ˜μ •μ•ˆ:

-spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao
+spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL:https://api.likelionnews.click}/login/oauth2/code/kakao

λ˜λŠ”,

  • BASE_URL 값을 μž…λ ₯ν•  λ•Œ ν›„ν–‰ μŠ¬λž˜μ‹œλ₯Ό μ œκ±°ν•˜λ„λ‘ λ¬Έμ„œν™”
  • λ³€κ²½ μ „/ν›„ ν™˜κ²½λ³„ λΆ€νŒ… ν…ŒμŠ€νŠΈ μˆ˜ν–‰
πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL}/login/oauth2/code/kakao
# SpringBoot/src/main/resources/application.properties
spring.security.oauth2.client.registration.kakao.redirect-uri=${BASE_URL:https://api.likelionnews.click}/login/oauth2/code/kakao
πŸ€– Prompt for AI Agents
In SpringBoot/src/main/resources/application.properties at line 47, the BASE_URL
placeholder may cause unresolved placeholder exceptions if not set, and trailing
slashes in BASE_URL can lead to double slashes in the redirect URI. To fix this,
provide a default value for BASE_URL using the syntax
${BASE_URL:http://default.url} to avoid unresolved placeholders, and ensure the
redirect-uri concatenation removes any trailing slash from BASE_URL to prevent
double slashes. Alternatively, document that BASE_URL should not have a trailing
slash and test application startup across environments before and after changes.

spring.security.oauth2.client.registration.kakao.authorization-grant-type=authorization_code
spring.security.oauth2.client.provider.kakao.authorization-uri=https://kauth.kakao.com/oauth/authorize
spring.security.oauth2.client.provider.kakao.token-uri=https://kauth.kakao.com/oauth/token
Expand Down
Loading