Skip to content

Conversation

@ch1kim0n1
Copy link
Member

Added:

  • Toaster UX friendly notification system
  • Password preview (show/hide)
  • Password strengthing scale
  • Back button on "fotgot password" page
  • Back button on "login" page
  • Handle logic for auth and error checks
  • Accessibility logic like enter button to enter and tab to switch input windows
  • ToastProvider wrapper was added to layout

@ch1kim0n1 ch1kim0n1 requested a review from ryanpolasky January 1, 2026 20:23
@ryanpolasky ryanpolasky self-assigned this Jan 2, 2026
@ryanpolasky ryanpolasky added the Code Quality Refactors & fixed related to code quality. label Jan 2, 2026
@ryanpolasky ryanpolasky changed the title [FEATURE] quality updates for login/registration feat: Quality updates for login/registration pages Jan 2, 2026
Copy link
Contributor

@ryanpolasky ryanpolasky left a comment

Choose a reason for hiding this comment

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

Just a few changes here as well for you to take a look at. Great stuff as always!

@@ -1,27 +1,53 @@
import React, { useState } from "react";
Copy link
Contributor

Choose a reason for hiding this comment

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

We already show explicit password requirements elsewhere, so the strength meter feels redundant and adds vertical bloat to a screen that’s already dense. The requirements list is more actionable than a “weak/strong” bar. My vote would be to keep just the original requirements to avoid mixed signals.

Copy link
Contributor

@ryanpolasky ryanpolasky Jan 2, 2026

Choose a reason for hiding this comment

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

We should also verify that these exact requirements exist & are checked on the backend. Pretty sure they are, but I'll double check that. Just writing this here as a note for myself :) Disregard this comment! Totally forgot we're operating off of Firebase's existing restrictions, these are are already handles on the backend! :)

console.error("Signup error:", err);
if (err && typeof err === "object" && "code" in err && err.code === "auth/email-already-in-use") {
setEmailError("An account with this email already exists.");
const { message, code } = getAuthErrorMessage(err);
Copy link
Contributor

Choose a reason for hiding this comment

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

We should be careful about which Firebase error messages are exposed to users. Some codes reveal account existence (like user-not-found, email-already-in-use). Might be worth mapping these to generic user-safe messages instead of returning Firebase’s raw strings. P sure this is an issue anywhere this line occurs, which I think is:

  • src/app/authentication/page.tsx
  • src/app/authentication/createAccount/page.tsx
  • src/app/authentication/newPassword/page.tsx
  • forgotPassword/page.tsx

!getEmailValidationError(email) &&
passwordValidation.isValid &&
!!confirmPassword &&
!validatePasswordMatch(password, confirmPassword);
Copy link
Contributor

Choose a reason for hiding this comment

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

Unless I'm readin it wrong, validatePasswordMatch returns string, not bool, so !validatePasswordMatch() relies on truthiness and will be fragile. We should prolly normalize it to bool like validatePasswordMatch() === "" or !Boolean(validatePasswordMatch()).

return `${Date.now()}-${Math.random().toString(16).slice(2)}`;
}

export function ToastProvider({ children }: { children: React.ReactNode }) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We may want to stack (like x2, x3, etc.) or just outright dedupe identical errors (i.e. rapid login retries or repeated network issues) so we don’t flood the user with stacked popups.

"resolved": "https://registry.npmjs.org/@firebase/app/-/app-0.14.4.tgz",
"integrity": "sha512-pUxEGmR+uu21OG/icAovjlu1fcYJzyVhhT0rsCrn+zi+nHtrS43Bp9KPn9KGa4NMspCUE++nkyiqziuIvJdwzw==",
"license": "Apache-2.0",
"peer": true,
Copy link
Contributor

Choose a reason for hiding this comment

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

The "peer": true flags added across a bunch entries here look weird for npm output. This doesn’t usually happen from a normal npm install and could Can we regenerate package-lock.json from a clean npm install to make sure dependency resolution is all good?

<EmailInput
value={email}
onChange={handleEmailChange}
onBlur={() => setEmailError(getEmailValidationError(email))}
Copy link
Contributor

Choose a reason for hiding this comment

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

Validating on blur is nice, but it shows errors while the user is still typing/navigating the page. Notably, going to any of the pages w/ an email entry & then clicking "back" shows an email error before the back is actually processed. Might be worth only showing after the field has been “touched” once.

<p className="text-red-500 text-xs mt-1">{emailError}</p>
)}
</div>
<form onSubmit={onSubmit} className="flex flex-col">
Copy link
Contributor

Choose a reason for hiding this comment

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

Wrapping inputs in <form> + handling Enter submit is a great improvement, small change but I'm v glad you caught this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Quality Refactors & fixed related to code quality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants