Skip to content

Commit

Permalink
Merge pull request #276 from ssu-student-union/feat/#273_passu_redire…
Browse files Browse the repository at this point in the history
…ction

feat: 기존 회원가입 사용자 flow
  • Loading branch information
jongse7 authored Oct 22, 2024
2 parents 1fe6148 + 3c05d56 commit 1a5d7fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/kakao/containers/KakaoRedirect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ const KakaoRedirect = () => {
const setLoginState = useSetRecoilState(LoginState);
const AUTHORIZE_CODE: string = new URLSearchParams(window.location.search).get('code')!;

const redirect_url: string | null = new URLSearchParams(window.location.search).get('subServiceUrl') || null;
const urlParams = new URLSearchParams(window.location.search);

const redirect_url = urlParams.get('subServiceUrl');
console.log(redirect_url);

const navigate = useNavigate();
Expand Down
2 changes: 2 additions & 0 deletions src/pages/kakao/redirect/containers/RegisterButtonSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ interface type {
export function RegisterButtonSection({ subServiceUrl }: type) {
const KAKAO_AUTH_URL = `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${rest_api_key}&redirect_uri=${baseUrl}${redirect_uri}&service_terms=${TAG}&subServiceUrl=${subServiceUrl}`;

console.log(KAKAO_AUTH_URL);

const handleLogin = () => {
window.location.href = KAKAO_AUTH_URL;
};
Expand Down

0 comments on commit 1a5d7fd

Please sign in to comment.