tiny-stack icon indicating copy to clipboard operation
tiny-stack copied to clipboard

Added Auth.js based authentication

Open NuroDev opened this issue 1 year ago • 1 comments

What's been changed?

  • Added astro-auth integration
    • Created Auth.js config (auth.config.ts) with GitHub provider by default + Drizzle database adapter
    • Added dependencies
      • @auth/core
      • @auth/drizzle-adapter
      • auth-astro
    • Added Auth.js schemas to Drizzle
    • Added types for the new schemas added above
    • Added new migration to add schemas / tables required for authentication
    • Added sign out button to CommentForm component
    • Added new /login page
    • Homepage now redirects to /login if not logged in
  • Added basic .example.env with template environment variables
  • Added a defaultName prop to CommentForm component
  • Added custom environment variable types to env.d.ts

NuroDev avatar Jan 03 '24 17:01 NuroDev

I've just realised that the README.md may also need updating in relation to the environment variables.

Shall we add the REPLICA_URL, LITESTREAM_ACCESS_KEY_ID & LITESTREAM_SECRET_ACCESS_KEY environment variables to the .example.env? And/or update the README.md to tell people how to use the .example.env instead?

NuroDev avatar Jan 03 '24 19:01 NuroDev