-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from potenday-project/development
Development
- Loading branch information
Showing
8 changed files
with
97 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,6 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# vscode | ||
.vscode |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { useEffect } from 'react'; | ||
import { useLocation } from 'react-router'; | ||
import instance from 'shared/axios'; | ||
|
||
export default function KakaoOauth() { | ||
const location = useLocation(); | ||
const urlParams = new URLSearchParams(location.search); | ||
const codeValue = urlParams.get('code'); | ||
|
||
const Login = async () => { | ||
const response = await instance.post(`/api/user/kakao?code=${codeValue}`); | ||
return response; | ||
}; | ||
|
||
useEffect(() => { | ||
console.log(Login()); | ||
}, []); | ||
|
||
return <>카카오 리다이렉트 페이지</>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { useEffect } from 'react'; | ||
import { useLocation } from 'react-router'; | ||
import instance from 'shared/axios'; | ||
|
||
export default function NaverOauth() { | ||
const location = useLocation(); | ||
const urlParams = new URLSearchParams(location.search); | ||
const codeValue = urlParams.get('code'); | ||
|
||
const Login = async () => { | ||
const response = await instance.post(`/api/user/naver?code=${codeValue}`); | ||
return response; | ||
}; | ||
|
||
useEffect(() => { | ||
console.log(Login()); | ||
}, []); | ||
|
||
return <>네이버 리다이렉트 페이지</>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters