Skip to content

Conversation

@ErikaKK
Copy link
Contributor

@ErikaKK ErikaKK commented Sep 3, 2025

Change Summary

[Briefly summarise the changes that you made. Just high-level stuff]
image
image

Change Form

Fill this up (NA if not available). If a certain criteria is not met, can you please give a reason.

  • The pull request title has an issue number
  • The change works by "Smoke testing" or quick testing
  • The change has tests
  • The change has documentation

Other Information

[Is there anything in particular in the review that I should be aware of?]

@ErikaKK ErikaKK requested a review from Copilot September 3, 2025 16:57
@ErikaKK ErikaKK linked an issue Sep 3, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Sep 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
website Ready Ready Preview Comment Sep 12, 2025 4:44pm

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds SSO (Single Sign-On) functionality using Google OAuth through Clerk authentication. The changes enable users to sign in with Google accounts and complete their profile through a new SSO callback flow.

  • Adds Google OAuth authentication flow to the join page
  • Creates SSO callback page for handling OAuth redirects
  • Implements user lookup by email functionality
  • Adds comprehensive error handling with cleanup for user creation

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/server/api/routers/users/index.ts Exports new getByEmail procedure
src/server/api/routers/users/get.ts Adds getByEmail query for user lookup by email
src/server/api/routers/users/create.ts Adds error handling with cleanup for failed user creation
src/middleware.ts Updates auth middleware and adds SSO callback route
src/app/sso-callback/page.tsx New SSO callback page for OAuth redirects
src/app/profile/[id]/page.tsx Renames imported component for clarity
src/app/profile/[id]/page-content.tsx Renames component from ProfilePage to ProfilePageContent
src/app/not-found.tsx Adds padding to not found page layout
src/app/join/page.tsx Adds Google OAuth sign-in button and flow
src/app/create-account/complete-profile/page.tsx New comprehensive profile completion page for SSO users

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@ErikaKK ErikaKK requested a review from Copilot September 4, 2025 14:58

This comment was marked as outdated.

@ErikaKK ErikaKK requested a review from Copilot September 9, 2025 16:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Single Sign-On (SSO) support to the application, specifically enabling Google OAuth authentication alongside the existing email-based authentication flow.

  • Adds Google OAuth authentication to the login page with redirect handling
  • Creates a new SSO callback page to handle OAuth redirects
  • Adds a profile completion flow for new SSO users
  • Refactors profile page components and updates middleware routing patterns

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/server/api/routers/users/index.ts Exports new getByEmail function for user lookup by email
src/server/api/routers/users/get.ts Adds getByEmail procedure to find users by email address
src/middleware.ts Updates protected route patterns and authentication logic
src/app/sso-callback/page.tsx New callback page for handling SSO authentication redirects
src/app/profile/[id]/page.tsx Refactors to use renamed component
src/app/profile/[id]/page-content.tsx Renames component from ProfilePage to ProfilePageContent
src/app/not-found.tsx Adds padding to improve layout
src/app/join/page.tsx Adds Google OAuth signin button and handler
src/app/create-account/page.tsx Minor cleanup of comments and error messages
src/app/create-account/complete-profile/page.tsx New profile completion page for SSO users

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

setLoading(false)
setStep("email")
}
}
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Missing blank line before function declaration. Add a blank line between the closing brace and the function declaration for consistency with the codebase style.

Suggested change
}
}

Copilot uses AI. Check for mistakes.
redirectUrlComplete: `/dashboard`, // after everything succeeds
})
} catch (error) {
console.error("Google sign-in failed", error)
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

Logging the complete error object to console may expose sensitive information. Consider logging only the error message or using a structured logging approach that filters sensitive data.

Suggested change
console.error("Google sign-in failed", error)
console.error("Google sign-in failed:", (error as { message?: string })?.message ?? error)

Copilot uses AI. Check for mistakes.
}
window.scrollTo({
top: 0,
behavior: "smooth", // smooth scrolling
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove redundant comment. The comment 'smooth scrolling' simply restates what the code already clearly expresses with behavior: \"smooth\".

Suggested change
behavior: "smooth", // smooth scrolling
behavior: "smooth",

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change authentication method

2 participants