Skip to content
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

chore: 구글 로그인 주석 해제 #423

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions features/login/components/organisms/login-screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useEffect, useState } from 'react';

import {
AppleLogoIcon,
// GoogleLogoIcon,
GoogleLogoIcon,
KakaoLogoIcon,
} from '@/components/atoms/icons';
import LoginMainCharacter from '@/public/images/login/login-main-character.png';
Expand All @@ -27,19 +27,9 @@ export const LoginScreen = ({ isAnimate = true }: LoginScreen) => {
window.location.href = `https://kauth.kakao.com/oauth/authorize?client_id=${process.env.NEXT_PUBLIC_KAKAO_CLIENT_ID}&redirect_uri=${process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI}&response_type=code&prompt=select_account`;
};

// const googleLogin = () => {
// window.location.href = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}&redirect_uri=${process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI}&response_type=code&scope=email profile&prompt=consent&access_type=offline`;
// };

// function generateNonceAndState(length = 16) {
// const charset =
// 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
// let nonce = '';
// for (let i = 0; i < length; i++) {
// nonce += charset.charAt(Math.floor(Math.random() * charset.length));
// }
// return nonce;
// }
const googleLogin = () => {
window.location.href = `https://accounts.google.com/o/oauth2/v2/auth?client_id=${process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID}&redirect_uri=${process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI}&response_type=code&scope=email profile&prompt=consent&access_type=offline`;
};

const appleLogin = () => {
setIsAppleLoginDisabled(true);
Expand Down Expand Up @@ -100,15 +90,15 @@ export const LoginScreen = ({ isAnimate = true }: LoginScreen) => {
<span>카카오로 로그인</span>
</div>
</button>
{/* <button
<button
className={buttons({ type: 'google' })}
onClick={googleLogin}
>
<div className={buttonContent}>
<GoogleLogoIcon />
<span>Google로 로그인</span>
</div>
</button> */}
</button>
<button
className={buttons({ type: 'apple' })}
onClick={appleLogin}
Expand Down
Loading