Skip to content

Conversation

PinJinx
Copy link

@PinJinx PinJinx commented Aug 6, 2025

Closes #115

📝 Description

In this PR i have added a basic Authentication system for the frontend with supabases built in email authentication system.

🔧 Changes Made

  • I have added a new Signup page that prompts user to signup using email password and username.
  • Made changes to the Login Page to use the same system. Also edited the App.tsx to Auto login the user once they are logged in.

📷 Screenshots or Visual Changes (if applicable)

Login Screen

image

SignUp Screen

image

After SignUp Screen

image

🤝 Collaboration

nil

✅ Checklist

  • I have read the contributing guidelines.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added necessary documentation (if applicable).
  • Any dependent changes have been merged and published in downstream modules.

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added user authentication using Supabase, including login, sign-up, forgot password, and password reset pages.
    • Introduced animated and styled forms with input validation and error handling for authentication flows.
    • Implemented toast notifications for user feedback during authentication processes.
    • Added new authentication routes for sign-up, forgot password, and reset password with conditional rendering based on user session.
  • Chores

    • Added Supabase client integration and related environment variable configuration.
    • Updated dependencies to include Supabase client library.
    • Enabled syntax highlighting in Vim configuration.

Copy link
Contributor

coderabbitai bot commented Aug 6, 2025

Walkthrough

The changes introduce a real authentication system using Supabase for the frontend. New pages for sign-up, password reset, and password recovery are added, and the login flow is refactored to use Supabase authentication. Environment configuration and Supabase client initialization are included. Error handling and session management are updated accordingly.

Changes

Cohort / File(s) Change Summary
Vim Editor Configuration
.vimrc
Adds syntax-highlighting=True to enable syntax highlighting in Vim.
Frontend Environment Setup
frontend/.env example
Adds example environment file specifying VITE_SUPABASE_URL and VITE_SUPABASE_KEY for Supabase integration.
Frontend Dependencies
frontend/package.json
Adds @supabase/supabase-js dependency for Supabase client integration.
Supabase Client Initialization
frontend/src/lib/supabaseClient.tsx
Introduces a module to initialize and export the Supabase client using environment variables, with explicit error handling for missing configuration.
Authentication Routing and Session Management
frontend/src/App.tsx
Refactors authentication check to use Supabase sessions, updates login/logout handlers, adds error handling, and introduces routes for sign-up, forgot password, and reset password pages with conditional rendering based on authentication status.
Login Flow Refactor
frontend/src/components/pages/LoginPage.tsx
Updates login logic to use Supabase's signInWithPassword, manages loading state, extracts form data, adds error handling, and changes "Forgot password?" button to navigate to the forgot password route.
Sign Up Page
frontend/src/components/pages/SignUpPage.tsx
Adds a new sign-up page with form validation, Supabase auth.signUp integration, confirmation UI, error handling, and animated UI components.
Forgot Password Page
frontend/src/components/pages/ForgotPasswrdPage.tsx
Adds a new page for password reset requests, integrating Supabase's resetPasswordForEmail, confirmation UI, error handling, and navigation controls.
Reset Password Page
frontend/src/components/pages/ResetPasswordPage.tsx
Adds a new page for resetting the user's password, handling Supabase session from URL tokens, password validation, update logic, error handling, and navigation.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant Supabase

    User->>App: Visit /login
    App->>Supabase: getSession()
    Supabase-->>App: Session info
    App->>User: Show LoginPage

    User->>App: Submit login form (email, password)
    App->>Supabase: signInWithPassword(email, password)
    Supabase-->>App: Auth result (success/failure)
    App->>User: Show success/error toast, redirect if authenticated

    User->>App: Visit /signup
    App->>User: Show SignUpPage
    User->>App: Submit sign-up form
    App->>Supabase: auth.signUp(email, password, ...)

    Supabase-->>App: Sign-up result
    App->>User: Show confirmation or error

    User->>App: Visit /forgot-password
    App->>User: Show ForgotPasswrdPage
    User->>App: Submit email for reset
    App->>Supabase: resetPasswordForEmail(email)
    Supabase-->>App: Reset email result
    App->>User: Show confirmation or error

    User->>App: Visit /reset-password with tokens
    App->>Supabase: setSession(access_token, refresh_token)
    Supabase-->>App: Session result
    App->>User: Show ResetPasswordPage
    User->>App: Submit new password
    App->>Supabase: updateUser({ password })
    Supabase-->>App: Update result
    App->>User: Show success/error, redirect
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective Addressed Explanation
Integrate Supabase's email/password auth system for sign-up, login, and session management (#115)
Replace mock login/signup logic with real Supabase authentication (#115)
Maintain user sessions and redirect users appropriately based on authentication status (#115)
Add basic error handling for authentication flows (invalid login, existing email, etc.) (#115)

Assessment against linked issues: Out-of-scope changes

No out-of-scope changes were found.

Poem

A bunny with code in its paws,
Hopped in and fixed all the auth flaws.
With Supabase near,
Secure logins appear—
Now users can sign up without pause!
🐇✨

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ece5133 and 815e99b.

📒 Files selected for processing (1)
  • frontend/src/components/pages/ResetPasswordPage.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • frontend/src/components/pages/ResetPasswordPage.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 6

🔭 Outside diff range comments (1)
.vimrc (1)

1-3: .vimrc shouldn’t live in the repo ‒ and the directive is invalid anyway

  1. Committing personal editor configuration clutters the project root and forces unrelated settings on every contributor. If shared editor settings are truly needed, place them under ./.editorconfig, ./.vscode/, or a dedicated tools/ide/ folder—otherwise drop the file from the PR.
  2. syntax-highlighting=True is not a valid Vim command; the canonical directive is simply syntax on (or syntax enable).

Recommended fix:

- syntax-highlighting=True
+ " Remove this file from the repository, or, if deliberate:
+ syntax on
🧹 Nitpick comments (7)
frontend/.env example (1)

1-3: Improve placeholder format for environment variables.

The environment variable placeholders contain spaces which could cause configuration issues if copied directly. Consider using underscores or hyphens instead.

-VITE_SUPABASE_URL=YOUR SUPABASE URL
+VITE_SUPABASE_URL=YOUR_SUPABASE_URL

-VITE_SUPABASE_KEY=YOUR SUPABASE ANON KEY
+VITE_SUPABASE_KEY=YOUR_SUPABASE_ANON_KEY
frontend/src/lib/supabaseClient.tsx (1)

1-9: Consider changing file extension from .tsx to .ts.

This file contains no JSX elements, so the .ts extension would be more appropriate than .tsx.

frontend/src/App.tsx (1)

84-91: Fix formatting and spacing consistency.

The signup route formatting is inconsistent with the login route above it.

           <Route
             path="/signup"
-            element= {isAuthenticated ? (
-                <Navigate to="/" replace />
-              ) : (
-                <SignUpPage/>
-              )}
+            element={
+              isAuthenticated ? (
+                <Navigate to="/" replace />
+              ) : (
+                <SignUpPage />
+              )
+            }
           />
frontend/src/components/pages/SignUpPage.tsx (4)

23-25: Remove unused interface.

The LoginPageProps interface is not used in this SignUpPage component and appears to be leftover from copying the LoginPage component.

-interface LoginPageProps {
-  onLogin: () => void;
-}

107-112: Use appropriate icon for username field.

The username field is using the Mail icon, which is semantically incorrect and confusing for users.

+import {
+  Settings,
+  Mail,
+  Lock,
+  LogIn,
+  User
+} from 'lucide-react';

  <InputField
-   icon={Mail}
+   icon={User}
    name="name"
    placeholder="Username"
    required
  />

191-197: Remove unnecessary state update before navigation.

Setting mailPage to false before navigating away is unnecessary since the component will unmount.

  <button
    type="button"
-   onClick={() => { setMailPage(false); navigate('/login') }}
+   onClick={() => navigate('/login')}
    className="mt-4 px-6 py-2 bg-green-500 hover:bg-green-600 text-white rounded-lg font-medium transition-colors"
  >
    Back to Sign In
  </button>

105-134: Consider adding client-side form validation for better UX.

Adding real-time validation feedback would improve user experience by catching errors before form submission.

Consider implementing client-side validation with visual feedback:

const [errors, setErrors] = useState<{[key: string]: string}>({});

const validateField = (name: string, value: string) => {
  const newErrors = { ...errors };
  
  switch (name) {
    case 'email':
      const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
      if (!emailRegex.test(value)) {
        newErrors.email = 'Please enter a valid email address';
      } else {
        delete newErrors.email;
      }
      break;
    case 'password':
      if (value.length < 6) {
        newErrors.password = 'Password must be at least 6 characters';
      } else {
        delete newErrors.password;
      }
      break;
  }
  
  setErrors(newErrors);
};

Then add onChange handlers to InputField components and display error messages.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1159d7 and f55700b.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .vimrc (1 hunks)
  • frontend/.env example (1 hunks)
  • frontend/package.json (1 hunks)
  • frontend/src/App.tsx (2 hunks)
  • frontend/src/components/pages/LoginPage.tsx (3 hunks)
  • frontend/src/components/pages/SignUpPage.tsx (1 hunks)
  • frontend/src/lib/supabaseClient.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
frontend/src/components/pages/LoginPage.tsx (1)
frontend/src/lib/supabaseClient.tsx (1)
  • supabase (8-8)
🔇 Additional comments (7)
frontend/package.json (1)

13-13: Supabase dependency version is current and secure

As of August 6, 2025, @supabase/supabase-js@^2.53.0 is the latest release and has no publicly reported security vulnerabilities. Continue to monitor the Supabase GitHub repo and major CVE databases for future updates.

• File frontend/package.json, line 13: "@supabase/supabase-js": "^2.53.0",

frontend/src/components/pages/LoginPage.tsx (3)

56-63: LGTM on form data extraction and authentication call.

The FormData approach for extracting form values and the Supabase authentication call are implemented correctly.


93-93: LGTM on form field naming.

Adding name attributes to form fields enables proper FormData extraction.


100-100: LGTM on form field naming.

Adding name attributes to form fields enables proper FormData extraction.

frontend/src/components/pages/SignUpPage.tsx (3)

29-40: LGTM!

The AuthLayout component provides a clean, reusable wrapper with proper responsive design and smooth animations.


42-52: LGTM!

The InputField component is well-designed with proper TypeScript typing, icon integration, and consistent styling. Good use of prop spreading for flexibility.


55-58: LGTM!

Clean component setup with appropriate state management and hook usage.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

🧹 Nitpick comments (6)
frontend/src/components/pages/ResetPasswrdPage.tsx (4)

83-85: Use strict equality and fix grammar

Minor correctness and UX polish.

-    if (password != repassword) {
-      toast.error("Passwords doesn't match. Try Again");
+    if (password !== repassword) {
+      toast.error("Passwords do not match. Try again.");
       return;
     }

88-95: Optional: confirm success to the user before redirect

A quick feedback toast improves UX.

-    if (error) {
+    if (error) {
       toast.error(error.message || "An unknown error occurred!");
       return;
     }
-    navigate("/");
+    toast.success("Password updated successfully.");
+    navigate("/", { replace: true });

111-118: Client-side validation hints for password fields

Add autoComplete="new-password" and a minimal length consistent with Supabase (default 6). This improves UX and browser behavior.

             <InputField
               icon={Key}
               type="password"
               name="password-1"
               className="mb-7"
               placeholder="New Password"
+              autoComplete="new-password"
+              minLength={6}
               required
             />
             <InputField
               icon={Key}
               type="password"
               name="password-2"
               className="mb-7"
               placeholder="Reenter Password"
+              autoComplete="new-password"
+              minLength={6}
               required
             />

Also applies to: 119-126


21-33: Deduplicate local Auth UI (DRY)

AuthLayout and InputField are likely repeated across auth pages. Centralize them under a shared components/auth/ module to reduce duplication and ensure consistent fixes/styles in one place.

I can draft a shared AuthLayout and InputField with full type safety and className merging. Want me to open a follow-up PR?

Also applies to: 34-44

frontend/src/components/pages/ForgotPasswrdPage.tsx (2)

36-46: Caller-supplied className is lost

<InputField> spreads ...props before hard-coding className, so any className passed by the caller (e.g. mb-7) is overridden. Merge the classes instead:

- <input
-   {...props}
-   className="block w-full pl-10 pr-3 py-2 border ... "
- />
+ const { className, ...rest } = props;
+ <input
+   {...rest}
+   className={`block w-full pl-10 pr-3 py-2 border ... ${className ?? ''}`}
+ />

49-49: Typo in component/file name

ForgotPasswrdPage is missing an “o”. Standardising to ForgotPasswordPage improves discoverability and avoids future import mistakes.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f55700b and 6e2cdb0.

📒 Files selected for processing (6)
  • frontend/src/App.tsx (2 hunks)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx (1 hunks)
  • frontend/src/components/pages/LoginPage.tsx (4 hunks)
  • frontend/src/components/pages/ResetPasswrdPage.tsx (1 hunks)
  • frontend/src/components/pages/SignUpPage.tsx (1 hunks)
  • frontend/src/lib/supabaseClient.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • frontend/src/lib/supabaseClient.tsx
  • frontend/src/components/pages/SignUpPage.tsx
  • frontend/src/App.tsx
  • frontend/src/components/pages/LoginPage.tsx
🧰 Additional context used
🧬 Code Graph Analysis (1)
frontend/src/components/pages/ForgotPasswrdPage.tsx (2)
frontend/src/lib/supabaseClient.tsx (1)
  • supabase (12-12)
backend/app/core/config/settings.py (1)
  • Settings (8-51)

@smokeyScraper
Copy link
Contributor

Hey @PinJinx ,
Thanks a lot for this. Could you please resolve the issues pointed out by coderabbit if they seem relevant?

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (4)
frontend/src/components/pages/ResetPasswordPage.tsx (4)

67-90: Validate type=recovery before setting session

Supabase recovery links include type=recovery. Guarding on this reduces accidental entry to this page with non-recovery links.

-    if (accessToken && refreshToken) {
+    const type = params.get('type');
+    if (type === 'recovery' && accessToken && refreshToken) {
       (async () => {
         try {
           const { error } = await supabase.auth.setSession({
             access_token: accessToken,
             refresh_token: refreshToken,
           });
           if (error) {
             toast.error("Error setting session: " + error.message);
             navigate('/login', { replace: true });
           }
         } catch {
           toast.error("Error setting session");
           navigate('/login', { replace: true });
         } finally {
           clearUrlHash();
         }
       })();
     } else {
-      toast.error("Access denied");
+      toast.error("Invalid or expired recovery link");
       navigate('/login', { replace: true });
       clearUrlHash();
     }

98-101: Fix grammar in mismatch message

-      toast.error("Passwords doesn't match. Try Again");
+      toast.error("Passwords don't match. Try again.");

146-161: Improve UX and browser behavior: add autocomplete, minlength, and aria-labels

These help password managers and accessibility, and align with your validation rules.

             <InputField
               icon={Key}
               type="password"
               name="password-1"
-              className="mb-7"
+              className="mb-7"
               placeholder="New Password"
+              aria-label="New password"
+              autoComplete="new-password"
+              minLength={8}
               required
             />
             <InputField
               icon={Key}
               type="password"
               name="password-2"
-              className="mb-7"
+              className="mb-7"
               placeholder="Reenter Password"
+              aria-label="Confirm new password"
+              autoComplete="new-password"
+              minLength={8}
               required
             />

135-135: Mount a single Toaster at the app root

Consider moving <Toaster /> to a top-level (e.g., App.tsx) to avoid multiple instances across pages and reduce DOM duplication.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6e2cdb0 and aa002d5.

📒 Files selected for processing (4)
  • frontend/src/App.tsx (3 hunks)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx (1 hunks)
  • frontend/src/components/pages/ResetPasswordPage.tsx (1 hunks)
  • frontend/src/components/pages/SignUpPage.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • frontend/src/components/pages/ForgotPasswrdPage.tsx
  • frontend/src/App.tsx
  • frontend/src/components/pages/SignUpPage.tsx

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
frontend/src/components/pages/ResetPasswordPage.tsx (2)

2-2: Import React types explicitly and avoid React. namespace references

Matches prior feedback: import the types and update the interface to prevent namespace issues in strict TS configs.

-import type { ReactNode, FormEvent } from "react";
+import type { ReactNode, FormEvent, InputHTMLAttributes, ElementType } from "react";
@@
-interface InputFieldProps extends React.InputHTMLAttributes<HTMLInputElement> {
-  icon: React.ElementType;
+interface InputFieldProps extends InputHTMLAttributes<HTMLInputElement> {
+  icon: ElementType;
 }

Also applies to: 17-19


35-45: Preserve caller-provided className in InputField

Current {...props} + fixed className drops caller classes (e.g., Line 155, 163). Merge them.

-const InputField = ({ icon: Icon, ...props }: InputFieldProps) => (
+const InputField = ({ icon: Icon, className, ...props }: InputFieldProps) => (
   <div className="relative">
     <div className="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
       <Icon className="h-5 w-5 text-gray-400" />
     </div>
     <input
-      {...props}
-      className="block w-full pl-10 pr-3 py-2 border border-gray-800 rounded-lg bg-gray-900 text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent"
+      {...props}
+      className={`block w-full pl-10 pr-3 py-2 border border-gray-800 rounded-lg bg-gray-900 text-white placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-green-500 focus:border-transparent ${className ?? ""}`}
     />
   </div>
 );
🧹 Nitpick comments (3)
frontend/src/components/pages/ResetPasswordPage.tsx (3)

98-101: Use strict comparison and fix grammar

Avoid type-coercing != and tweak the message.

-    if (password != repassword) {
-      toast.error("Passwords doesn't match. Try Again");
+    if (password !== repassword) {
+      toast.error("Passwords don't match. Try again.");
       return;
     }

118-121: Refine “special character” check (spaces currently count as special)

/[^A-Za-z0-9]/ matches spaces and other whitespace. If spaces shouldn’t satisfy the rule, use a stricter check.

-    if (!/[^A-Za-z0-9]/.test(password)) {
-      toast.error("Password must contain at least one special character.");
+    if (!/[^\w\s]/.test(password)) {
+      toast.error("Password must contain at least one non-alphanumeric symbol (excluding spaces).");
       return;
     }

If you prefer an allowlist, we can switch to an explicit symbol set (e.g., !@#$...). Confirm desired policy and I’ll adjust.


151-166: Improve UX and browser integration for password fields

Add autoComplete="new-password" and minLength hints; consider ARIA labels.

             <InputField
               icon={Key}
               type="password"
               name="password-1"
               className="mb-7"
               placeholder="New Password"
+              autoComplete="new-password"
+              minLength={8}
+              aria-label="New password"
               required
             />
             <InputField
               icon={Key}
               type="password"
               name="password-2"
               className="mb-7"
               placeholder="Reenter Password"
+              autoComplete="new-password"
+              minLength={8}
+              aria-label="Confirm new password"
               required
             />
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between aa002d5 and ece5133.

📒 Files selected for processing (1)
  • frontend/src/components/pages/ResetPasswordPage.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
frontend/src/components/pages/ResetPasswordPage.tsx (2)
frontend/src/lib/supabaseClient.tsx (1)
  • supabase (12-12)
backend/app/core/config/settings.py (1)
  • Settings (8-51)
🪛 Biome (2.1.2)
frontend/src/components/pages/ResetPasswordPage.tsx

[error] 202-202: expected } but instead the file ends

the file ends here

(parse)

🔇 Additional comments (1)
frontend/src/components/pages/ResetPasswordPage.tsx (1)

122-135: Good: robust loading state and success feedback around updateUser

This addresses prior feedback: loading is reset via finally, errors are handled, and success shows a toast before navigating.

Copy link
Contributor

@smokeyScraper smokeyScraper left a comment

Choose a reason for hiding this comment

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

A few things to be taken care of -

  • Even if the user has never registered, the forgot password option still sends a mail to them. However it does nothing and just redirects to login.
  • Could you please add on a logout button too in the profile section. The only way to logout currently is by clearing browser cache.
  • Auth state not subscribed globally (can break post-reset flow). Only an initial getSession() runs; the app doesn't react to token changes (confirm email, password reset, sign-out in other tabs). Something like onAuthStateChange should be implemented.
  • Multiple toasters being rendered throughout. There's a global toaster in App. Please keep a single global toaster.
  • supabaseClient.tsx contains no JSX; rename to supabaseClient.ts.
  • .env example is missing VITE_BASE_URL.
  • reset-password seems to be not implement. It can probably be added in the profile section.

Could you please resolve 1, 3, 4, 5, 6.
Rest for 2 and 7 separate issue can be raised.

Thanks a lot for you contribution. Rest PR seems fine to me.

<p className="text-center text-gray-400 text-sm">
<button
type="button"
onClick={() => navigate('/signup')}
Copy link
Contributor

Choose a reason for hiding this comment

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

this should re-direct to sign in. It says "Back to SignIn" but redirect to SignUp

@PinJinx PinJinx requested a review from smokeyScraper August 13, 2025 14:41
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.

FEATURE REQUEST:Adding an Authentication System
2 participants