Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fracalo/astro-supabase-ss
https://github.com/fracalo/astro-supabase-ss
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/fracalo/astro-supabase-ss
- Owner: fracalo
- Created: 2023-08-27T13:13:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-03T15:15:51.000Z (about 1 month ago)
- Last Synced: 2024-11-03T16:20:42.955Z (about 1 month ago)
- Language: Astro
- Size: 194 KB
- Stars: 27
- Watchers: 1
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-rainmana - fracalo/astro-supabase-ss - (Astro)
README
Supabase + Astro = ❤️
This is a basic astro template with supabase SSR integration.
The auth flow is made on the client,
tokens are then passed to the server through cookies,
the authentication for private pages is performed on the server.## Prerequisites
The template builds on top of Astro's default blank theme, the structure should be self explanatory but if you have any doubts you'll probably find most answers in the astro docs.For the service I'm using the supabase local development setup.
Supabase should be configured with "user management data" template (in the SQL editor), in alternative you can run the sql queries following [this](https://supabase.com/docs/guides/getting-started/tutorials/with-react#set-up-the-database-schema) guide (just for the supabase configuration).A boilerplate .env file with placeholders is provided, you'll need to add your supabase keys there.
## Disclaimer
NB: This template is an opinionated take, any feedback is welcome!## Structure
3 pages are provided:- home (current page): which has no authentication requirements.
- profile: reachable only if authenticated.
- login: if authentication is already in place it will redirect to the home page.