Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Partial] Auth setup part 3/n #21

Merged
merged 18 commits into from
Dec 4, 2024
Merged

[Partial] Auth setup part 3/n #21

merged 18 commits into from
Dec 4, 2024

Conversation

aahnik
Copy link
Contributor

@aahnik aahnik commented Dec 4, 2024

This pull request includes significant updates to the authentication system, database schema, and user interface components. The changes introduce new API routes for login, logout, and registration, update the database schema, and add a new unauthorized access page.

Authentication System Updates:

Database Schema Updates:

  • db/schema.ts: Updated the users table to include email with a unique constraint and removed the userEmails table. Fixed formatting issues in multiple table definitions. [1] [2] [3] [4] [5] [6] [7] [8]

User Interface Components:

  • contexts/auth-context.tsx: Created an authentication context with login, signup, and logout methods, and a provider component to manage authentication state.
  • mint/unauthorized.tsx: Added a new unauthorized access page with a logout button and a message for users without permission.
  • app/unauth/page.tsx: Created a new page that renders the UnauthorizedPage component.

Utility Functions:

Additional Changes:

@aahnik aahnik merged commit 8d547b6 into main Dec 4, 2024
1 check passed
@aahnik aahnik deleted the auth-setup branch December 4, 2024 01:28
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.

2 participants