Skip to content

fix#188

Open
aabxtract wants to merge 1 commit into
Nexacore-Org:mainfrom
aabxtract:main
Open

fix#188
aabxtract wants to merge 1 commit into
Nexacore-Org:mainfrom
aabxtract:main

Conversation

@aabxtract
Copy link
Copy Markdown

PR Description

Summary

Fixes a login bug where user.name in the Zustand auth store was stored as undefined after OTP verification. The backend returns firstName and lastName, not a flat name field, so the login response was being incorrectly cast.

What changed

  • Updated use-auth-store.ts
    • User now includes:
      • firstName
      • lastName
      • name (derived display name)
  • Updated OTP verification flow in page.tsx
    • Changed response typing to match backend shape
    • Derived full name from firstName + lastName
    • Passed the full user object into setAuth(...)
  • Updated profile auth writes in:
    • profile-overview.tsx
    • profile-edit-form.tsx
    • These now also set firstName, lastName, and derived name

Result

  • user.name is now populated with the correct full display name after login
  • Display name references across the app will render correctly
  • No TypeScript errors introduced in modified files

Files changed

  • use-auth-store.ts
  • page.tsx
  • profile-overview.tsx
  • profile-edit-form.tsx

closes #172

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@aabxtract Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

[Wave 100pts] Fix: user.name is undefined after login — backend returns firstName/lastName, not name

1 participant