Skip to content

Auth Architecture: Merge user tables and configure Better-Auth roles #95

Description

@Navmi-Srithaj

Description

  • [cite_start]The Better-Auth user table should not be separate from the site user table. [cite: 3]
  • [cite_start]Retrieving user roles needs to be fixed. [cite: 4]
  • [cite_start]Delete api/auth/me.ts entirely; this functionality is provided natively by Better-Auth and is currently being rebuilt worse. [cite: 5]
  • [cite_start]Attach user roles as an additional field within server/lib/auth.ts instead. [cite: 6]
  • Delete composables/useAuth.ts. [cite_start]This currently only exists to attach roles to the session, which can be handled by configuring Better-Auth correctly. [cite: 6, 7]
  • Export the auth client inside utils/auth-client.ts. [cite_start]Refer to the stage branch to see this implementation pattern. [cite: 8]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions