Skip to content

Comments

Authentication#22

Open
RNR1 wants to merge 7 commits intomainfrom
auth-middleware
Open

Authentication#22
RNR1 wants to merge 7 commits intomainfrom
auth-middleware

Conversation

@RNR1
Copy link
Contributor

@RNR1 RNR1 commented Feb 19, 2026

Admin Authentication

Problem

As a PHLask admin, I'd like to have a sign in page to the admin dashboard so that I can access the dashboard securely.

Solution

  • Made changes to how we access the database so that it can be accessible in the server (via react router loader and action functions)
  • Added a sign in route with an authentication form (/auth).
    • The form contains both client-side and server-side validation using Remix Forms - a thin layer behind Zod, React Hook Form, React Router, and Typescript
    • We use Supabase Authentication to authenticate the user. You can create a user in the Supabase Authentication Panel
    • After a successful authentication, the user is redirected to the dashboard route
    • Sessions are persisted via Cookies
  • Created a logout route to clear the user session and redirect back to the login screen
  • Update the environment variable names to match Supabase best practices
  • Updated README and cleared unused files

Reference

Issue link TBA

Screenshots

Screenshot 2026-02-21 at 1 39 06 AM Screenshot 2026-02-21 at 1 38 59 AM Screenshot 2026-02-21 at 1 38 47 AM

Checklist

  • Changes have been tested locally
  • Changes have been self-reviewed

@RNR1 RNR1 changed the title Authentication (DRAFT Authentication (DRAFT) Feb 19, 2026
throw error;
}
},
> = (client) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only change here is injecting the client here, so that we can use it on the server

@RNR1 RNR1 marked this pull request as ready for review February 21, 2026 06:07
@RNR1 RNR1 changed the title Authentication (DRAFT) Authentication Feb 21, 2026
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.

1 participant