Skip to content

Commit b8ba6f6

Browse files
committed
Merge branch 'HitFix/Auth' into develop
2 parents 73bbc04 + 8db3f42 commit b8ba6f6

File tree

6 files changed

+10
-22
lines changed

6 files changed

+10
-22
lines changed

pages/api/auth/sign-in/google.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
1313
const clientId = process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID;
1414
const clientSecret = process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET;
1515
const redirectUri =
16-
process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI_SIGN_IN ||
17-
"http://localhost:3000/";
16+
process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI_SIGN_IN || "/";
1817

1918
if (!clientId || !clientSecret) {
2019
return res
@@ -59,7 +58,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
5958
path: "/",
6059
})
6160
);
62-
return res.redirect("http://localhost:3000");
61+
return res.redirect("/");
6362
}
6463
} catch (loginError: any) {
6564
return res.redirect("/signup");

pages/api/auth/sign-in/kakao.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
1111
}
1212

1313
const redirectUri =
14-
process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI_SIGN_IN ||
15-
"http://localhost:3000/";
14+
process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI_SIGN_IN || "/";
1615

1716
try {
1817
const loginResponse = await axiosInstance.post("/auth/sign-in/kakao", {
@@ -32,7 +31,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
3231
path: "/",
3332
})
3433
);
35-
return res.redirect("http://localhost:3000");
34+
return res.redirect("/");
3635
}
3736
} catch (loginError: any) {
3837
console.error(

pages/api/auth/sign-up/google.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
1818
const clientId = process.env.NEXT_PUBLIC_GOOGLE_CLIENT_ID;
1919
const clientSecret = process.env.NEXT_PUBLIC_GOOGLE_CLIENT_SECRET;
2020
const redirectUri =
21-
process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI_SIGN_UP ||
22-
"http://localhost:3000/";
21+
process.env.NEXT_PUBLIC_GOOGLE_REDIRECT_URI_SIGN_UP || "/";
2322

2423
if (!clientId || !clientSecret) {
2524
return res
@@ -51,7 +50,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
5150
const signUpResponse = await axiosInstance.post("/auth/sign-up/google", {
5251
name: name || "사용자",
5352
token: id_token,
54-
redirectUri: "http://localhost:3000",
53+
redirectUri: "/",
5554
});
5655

5756
const accessToken = signUpResponse.data.access_token;

pages/api/auth/sign-up/kakao.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
1111
}
1212

1313
const redirectUri =
14-
process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI_SIGN_UP ||
15-
"http://localhost:3000/";
14+
process.env.NEXT_PUBLIC_KAKAO_REDIRECT_URI_SIGN_UP || "/";
1615

1716
// 회원가입 시도
1817
try {
@@ -34,7 +33,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
3433
path: "/",
3534
})
3635
);
37-
return res.redirect("http://localhost:3000");
36+
return res.redirect("/");
3837
}
3938
} catch (signUpError: any) {
4039
console.error(

pages/signup/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ const SignupPage = () => {
5757
error={errors.password}
5858
/>
5959
<AuthInput
60-
text="비밀번호"
60+
text="비밀번호 확인"
6161
type="password"
6262
name="passwordConfirm"
63-
placeholder="비밀번호를 입력해주세요."
63+
placeholder="비밀번호를 한번 더 입력해주세요."
6464
value={values.passwordConfirm}
6565
onChange={handleChange}
6666
onBlur={handleBlur}

test.http

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)