로그인 성공 정리필요
This commit is contained in:
@@ -10,15 +10,15 @@ const LoginForm = () => {
|
|||||||
const [id, setId] = useState('') //ID
|
const [id, setId] = useState('') //ID
|
||||||
const [pw, setPw] = useState('') //PW
|
const [pw, setPw] = useState('') //PW
|
||||||
const [params, setParams] = useState({
|
const [params, setParams] = useState({
|
||||||
id:'',
|
id: '',
|
||||||
pw:''
|
pw: ''
|
||||||
})
|
})
|
||||||
const requestUrl = 'https://kauth.kakao.com/oauth/authorize'
|
const requestUrl = 'https://kauth.kakao.com/oauth/authorize?client_id=a1d6afef2d4508a10a498b7069f67496&redirect_uri=http://localhost:8080/login/oauth-kakao&response_type=code'
|
||||||
|
|
||||||
const login = () => {
|
const login = () => {
|
||||||
axios.get(requestUrl, {
|
axios.get(requestUrl, {
|
||||||
headers : {
|
headers: {
|
||||||
"client_id":"a1d6afef2d4508a10a498b7069f67496",
|
"client_id": "a1d6afef2d4508a10a498b7069f67496",
|
||||||
}
|
}
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
console.log(requestUrl + "===>")
|
console.log(requestUrl + "===>")
|
||||||
@@ -31,10 +31,10 @@ const LoginForm = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Link href={'https://kauth.kakao.com/oauth/authorize'}>
|
<Link href={requestUrl}>
|
||||||
<button type="button">
|
<button type="button">
|
||||||
<img src={loginButton.src} alt="카카오톡 로그인"/>
|
<img src={loginButton.src} alt="카카오톡 로그인" />
|
||||||
</button>
|
</button>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user