This repo contains an example app showcasing how to use Supabase authentication with Astro. We use Supabase is used for user sign-up and authentication, and Astro for a mix of static site generation (SSG), and server side rendering (SSR). The app is deployed to Vercel.
Check out the demo at: astro-supabase-vercel.vercel.app .
- To improve security, the cookies for this app should be Secure and HttpOnly cookies.
- We don't handle automatic renewal of JWTs.
- Error handling is minimal
- Fix issue #4
- Proper error handling for expired JWTs
- Fix Secure and HttpOnly cookies
- Add social media preview
- Add tailwind
- Build login screen
- Build register screen
- Add spinner for link
- Remove Supabase key from code
- Fix redirects after logout
- Add outline to README
- Common auth part for all sub pages
- Remove console.log()
- Clean up code
- Redirect after sign in
- Add 2 paragraphs of text per about page
- Minor
- Fix margin bottom
- Remove content on 2nd paragraph
- Fix page titles
- Can we set server side cookie AND redirect? - Yes
- https://docs.astro.build/en/guides/server-side-rendering/#astrorequestheaders
npm install @astrojs/vercel
- Problems
*
<MyAuth client:only="react">