This demo uses Astro and Supabase to create a simple app showcasing the use of Supabase's auth and database features.
Try a live demo.
Astro and Supabase auth and database demo
Home Page: https://astro-supabase-auth.vercel.app
License: MIT License
Hi,
Sorry for bugging you. I went through your repo and it is soo clean and clear. This is the simplest and robust authentication with Supabase and Astro.
I want your opinion on how to implement Password reset flow for the user. I currently use this feature but it doesn't look clean in my code. If possible you can implement the password reset feature to your repo.
I am looking at something like the way it is described in supabase docs.
User forgot password
I would be very grateful to you if you could do this. Anyway thanks for your current repo, it helped me a lot.
Thank you.
Hello ๐
First, thank you for this repo!
I found a vulnerability for the /api/guestbook
endpoint, we don't need to be logged in to add or read guestbooks.
Sign out from the dashboard, open the dev console and past this.
await fetch("https://astro-supabase-auth.vercel.app/api/guestbook", {
method: "POST",
body: '{"name":"it","message":"works"}'
})
I think if you had some logic to retrieve the current session and user here ๐
We have the cookies sent in the headers, we can use them I think
Protected routes in middleware.ts will fail to identify the protected route if the protected route has a trailing "/" such as "/dashboard/"
In short:
if (protectedRoutes.includes(url.pathname)) will return true for "/dashboard" , but false for "/dashboard/", thus allowing access to the protected route.
You can either add both "/dashboard" and "/dashboard/" to your protected routes array, or add some code to remove all "/" from url.pathname, and then just put "dashboard" in your protected routes array.
This would work with the requested path being either /dashboard or /dashboard/
// remove the slash in the protected route array
const protectedRoutes = ["dashboard"];
// add .split with the .join to the url.pathname to remove all slashes from the url.pathname
if (protectedRoutes.includes(url.pathname.split('/').join("")))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.