-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/#1/kakao social login setting #8
Changes from 1 commit
d665de5
8c14a40
ee80b4d
7c62d45
5fe51e7
5bd87fe
d87b6ff
88bb6dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,18 @@ | ||||||||||
const Login = () => { | ||||||||||
const REST_API_KEY: string = import.meta.env.REST_API_KEY; | ||||||||||
const REDIRECT_URI: string = import.meta.env.REDIRECT_URI; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
const link: string = `https://kauth.kakao.com/oauth/authorize?client_id=${REST_API_KEY}&redirect_uri=${REDIRECT_URI}&response_type=code`; | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 값이 이미 문자열이라, 타입이 자동 추론돼서 생략해도 될 것 같습니당! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 제가 TS프로젝트가 처음이라... 민희님 말씀대로 추론이 가능한 경우에 생략과 그래도 확실한 명시 중에 어떤 방식이 좋은건가요?? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 저는 추론이 가능한 경우라면 코드 간결성을 위해 생략하는 게 좋다고 생각해요! vscode에서는 변수에 마우스 올리면 타입을 볼 수 있어서 따로 명시하지 않아도 된다고 생각합니다 |
||||||||||
|
||||||||||
const loginHandler = () => { | ||||||||||
window.location.href = link; | ||||||||||
}; | ||||||||||
|
||||||||||
return ( | ||||||||||
<div> | ||||||||||
<button type="button" onClick={loginHandler}> | ||||||||||
Hello Kakao Login | ||||||||||
</button> | ||||||||||
</div> | ||||||||||
); | ||||||||||
}; | ||||||||||
export default Login; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VITE_
프리픽스를 앞에 명시해줘야 환경 변수가 잘 동작하지 않나요?! 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
네네 맞습니다. 그 부분을 체크 못했네요!! 수정하겠습니다. 감사합니다~