Skip to content

Commit

Permalink
Merge pull request #84 from semicolonDSM/develop
Browse files Browse the repository at this point in the history
fix: 로그인오류해결
  • Loading branch information
eungyeole authored Jul 7, 2021
2 parents b411390 + 3d0f1b9 commit d8a5e45
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/Auth/Callback/Callback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export const onSilentRefresh = () => {
function Callback(params: any){
const onLogin = () => {
const code=String(params.location.search);
auth.postToken(code.split("?code=")[1].split("&state=")[0])
.then((res)=>auth.getUsersToken(res.data['access-token']).then(async (res)=>{ await OnLoginSuccess(res); window.location.href="/"}))
/*auth.getToken(code.split("?code=")[1].split("&state=")[0])
// auth.postToken(code.split("?code=")[1].split("&state=")[0])
// .then((res)=>auth.getUsersToken(res.data['access-token']).then(async (res)=>{ await OnLoginSuccess(res); window.location.href="/"}))
auth.getToken(code.split("?code=")[1].split("&state=")[0])
.then(async (res)=>{ await OnLoginSuccess(res); window.location.href="/"})
.catch((e)=>console.error(e))*/
.catch((e)=>console.error(e))
}
useEffect(()=>{
onLogin()
Expand Down

0 comments on commit d8a5e45

Please sign in to comment.