Skip to content

Fix/community write login redirect#556

Merged
yoonc01 merged 3 commits into
mainfrom
fix/community-write-login-redirect
Jun 15, 2026
Merged

Fix/community write login redirect#556
yoonc01 merged 3 commits into
mainfrom
fix/community-write-login-redirect

Conversation

@yoonc01

@yoonc01 yoonc01 commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

작업 내용

  • 커뮤니티에서 비로그인 사용자가 글쓰기 버튼 클릭 시 로그인 화면으로 전환 + 로그인 or 회원가입 후 글쓰기 화면으로 redirect

@yoonc01 yoonc01 self-assigned this Jun 14, 2026
@vercel

vercel Bot commented Jun 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
solid-connect-university-web Ready Ready Preview, Comment Jun 15, 2026 1:59pm
solid-connection-web Ready Ready Preview, Comment Jun 15, 2026 1:59pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
solid-connect-web-admin Skipped Skipped Jun 15, 2026 1:59pm

@coderabbitai

coderabbitai Bot commented Jun 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 957863a5-31f2-40ad-b998-69589a430fbc

📥 Commits

Reviewing files that changed from the base of the PR and between 992811b and 72edffd.

📒 Files selected for processing (1)
  • apps/web/src/components/login/signup/SignupSurvey.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/web/src/components/login/signup/SignupSurvey.tsx

Walkthrough

이 PR은 인증 후 사용자가 원래 보고 있던 커뮤니티 경로로 돌아가는 리다이렉트 기능을 전체 로그인·회원가입 흐름에 걸쳐 추가합니다.

1. 리다이렉트 유틸 및 타입 정의
새로운 authRedirect.ts에서 redirect 파라미터를 안전하게 검증하고 URL을 생성하는 유틸들(getSafeCommunityRedirectPath, getCommunityRedirectOrFallback, buildLoginPathWithRedirect, buildSignUpEmailPathWithRedirect, buildSignUpPath)을 추가하고, API 타입으로 AuthRedirectOptions를 정의합니다.

2. OAuth 및 인증 훅 시그니처 변경
kakaoLoginappleLoginredirectPath 인자를 받아 OAuth 흐름에 포함하고, usePostEmailAuth, usePostKakaoAuth, usePostAppleAuth는 동일하게 AuthRedirectOptions를 받아 성공 후 안전한 리다이렉트 경로로 이동하도록 변경합니다.

3. 로그인 페이지 redirectPath 추출 및 전파
LoginContent에서 URL 쿼리 파라미터를 읽어 안전한 redirectPath를 계산한 후, 이메일 로그인, Kakao/Apple 로그인, 회원가입 버튼에 모두 전달합니다.

4. OAuth 콜백 페이지에서 redirectPath 수신
카카오와 Apple 로그인 콜백 페이지에서 쿼리 파라미터로 들어온 redirect 값을 검증하여 각 인증 훅에 전달합니다.

5. 회원가입 플로우에 redirectPath 반영
이메일 회원가입 폼과 회원가입 설문 컴포넌트에서 redirect 파라미터를 읽고, 완료 후 해당 경로로 이동하도록 수정합니다. 또한 signUpToken 검증을 useEffect 기반으로 개선합니다.

6. 커뮤니티 글쓰기 진입 시 인증 가드 추가
글쓰기 버튼 클릭 시 인증 상태를 확인하고, 미인증 사용자는 현재 페이지를 redirect 파라미터로 담아 로그인 페이지로 안내합니다. PostForm 컴포넌트도 마찬가지로 진입 시 인증을 검증합니다.

7. 로딩 UI 통일
여러 페이지의 Suspense fallback을 기존의 텍스트 기반 로딩에서 CloudSpinnerPage로 교체하여 일관된 로딩 경험을 제공합니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25분

Suggested reviewers

  • wibaek
  • enunsnv
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive PR 설명이 작업 내용의 핵심만 포함하고 있으며, 템플릿의 필수 섹션 중 '관련 이슈'와 '특이 사항'이 누락되어 있습니다. 관련 이슈 번호를 명시하고, 리다이렉트 경로 검증 방식이나 보안 관련 특이 사항을 추가하여 설명을 보충해 주세요.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Pull request 제목이 변경 사항의 주요 목적과 부합합니다. 비로그인 사용자의 커뮤니티 글쓰기 시 로그인 리다이렉트 흐름을 명확히 나타내고 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/community-write-login-redirect

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@yoonc01

yoonc01 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/web/src/components/login/signup/SignupSurvey.tsx`:
- Around line 33-37: The router.push call on line 35 is being executed during
the render phase, which can cause re-render loops and warnings, and allows the
component to continue rendering with invalid state before navigation completes.
Move the signUpToken validation and router.push navigation into a useEffect hook
that depends on signUpToken, ensuring navigation happens after the render phase
and preventing the rest of the component logic from executing when the token is
missing.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: da0b6a47-9326-4277-95aa-d3fdd359d084

📥 Commits

Reviewing files that changed from the base of the PR and between dfe8930 and 992811b.

📒 Files selected for processing (18)
  • apps/web/src/apis/Auth/api.ts
  • apps/web/src/apis/Auth/postAppleAuth.ts
  • apps/web/src/apis/Auth/postEmailLogin.ts
  • apps/web/src/apis/Auth/postKakaoAuth.ts
  • apps/web/src/app/community/[boardCode]/CommunityPageContent.tsx
  • apps/web/src/app/community/[boardCode]/create/PostForm.tsx
  • apps/web/src/app/login/LoginContent.tsx
  • apps/web/src/app/login/apple/callback/AppleLoginCallbackPage.tsx
  • apps/web/src/app/login/apple/callback/page.tsx
  • apps/web/src/app/login/kakao/callback/KakaoLoginCallbackPage.tsx
  • apps/web/src/app/login/kakao/callback/page.tsx
  • apps/web/src/app/login/page.tsx
  • apps/web/src/app/sign-up/email/EmailSignUpForm.tsx
  • apps/web/src/app/sign-up/email/page.tsx
  • apps/web/src/app/sign-up/page.tsx
  • apps/web/src/components/login/signup/SignupSurvey.tsx
  • apps/web/src/utils/authRedirect.ts
  • apps/web/src/utils/authUtils.ts

Comment thread apps/web/src/components/login/signup/SignupSurvey.tsx Outdated
@vercel vercel Bot temporarily deployed to Preview – solid-connect-web-admin June 15, 2026 13:57 Inactive
@yoonc01 yoonc01 merged commit 430af70 into main Jun 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant