supabase-js
auth-helpers
Our great sponsors
supabase-js | auth-helpers | |
---|---|---|
28 | 18 | |
2,819 | 880 | |
4.6% | 2.3% | |
8.2 | 8.2 | |
4 days ago | 5 days ago | |
TypeScript | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
supabase-js
- Chrome Extension MV3 Template : Supabase Auth, Plasmo, Tailwinds CSS & Shadcn UI
-
Supabase Beta May 2023
[Edge Functions] Custom domains and vanity domains support for Edge Functions. PR
-
How do errors look like? Handling errors.
First of all, the code you provided is not directly supabase, but is whatever is provided from the javascript library. The auth part is then redirecting to the gotrue-js library, and as seen here [Gotrue-JS#L238] it returns a `Promise` and that specific type is declared here Where we see it could be two return types. ```ts | { data: { user: User | null session: Session | null } error: null } | { data: { user: null session: null } error: AuthError }
-
Authentication in Next.js with Supabase and Next 13
Next up, Supabase released v2 of their JavaScript client library (supabase-js), which brought with it a number of developer experience type improvements, and streamlined how we use some of the API's. A number of methods were also deprecated in this new release, which we'll cover later in this guide.
-
Develop a Cryptocurrency Tracking WebApp with Instant Email Notifications
We install the Supabase client library and also Chakra-UI which we will be using to build our React components.
-
Sign in with Apple using Supabase and Ionic Angular
The last part is the easiest as we simply need to connect Supabase to our Ionic app and call one function. Get started by bringing up a new Ionic app and install the Supabase JS client:
- Lucia, the authentication library for SvelteKit, had tons of updates in the last month - It now supports the latest version of SvelteKit and allows you to run load functions in parallel for faster load times (even when using auth)!
-
Using env. variables without VITE_ prefix
Under src/lib I have a .ts file where I create a supabase client inside.
-
Building In Public: Cartta Tech Stack
First and foremost, the language and framework – Typescript & React. Typescript is a must for a project of this size. It provides safety and peace of mind as I iterate quickly to solve bugs and add new features. React is a by-product of the next two things I will mention, Next and Remix. Both of these are higher abstractions on top of React and supply incredible tooling to build fast server side rendered applications. Picking one or the other was driven by my database and auth provider, Supabase. I could have tried to make it work with Remix, but there was already an authentication helper for Next from the Supabase community so I decided on Next. Still using Remix for this current website since I do love Remix so much.
-
Idea Validation - No Code RestAPI creator from relational DB
Have a look at https://postgrest.org/en/stable/. They do something in this direction and e.g. supabase.io uses them. Their approach is, if you have a database you have a REST API.
auth-helpers
-
Supabase Authentication Issue with Next.js 13.4 - !session vs !user
I have encountered a similar issue, but I haven't fully found a solution yet. Currently, I'm using the getSession function throughout my server components. Yesterday, I tried running a middleware to refresh the user's session, based on this example: https://github.com/supabase/auth-helpers/blob/main/examples/nextjs/middleware.tsx. This caught my attention because the comment mentioned that the middleware is necessary for any Server Component route using createServerComponentClient. Right now, I'm testing this approach, and so far, I haven't been logged out since yesterday. Do you have that in your application? The main difference between getSession and getUser in supabase is that getSession reads the cookies and is very fast (around 1-2 ms), while getUser makes a call to the supabase API with the access token to retrieve the user and I would assume they also verify the JWT on their end.
-
SvelteKit is awful for building PWAs
F.ex. Have a look how supabase-auth-helper-sveltekit works. This is the "SvelteKit way" to approach authentication. It also works perfectly with invalidate to reload or invalidate data that is connected to the current user session. As pointed out already, there is no reason you should not be able to access your JWT.
-
Supabase Beta May 2023
We have updated the Next.js Auth Helpers package to make it available across the client and server of the App Router. They also now implement server-side auth by default with PKCE - meaning the entire auth flow is now possible server-side.
-
Need some help with auth and nextjs13 (using app folder) that I just can't seem to wrap my head around something trivial
Example
- When to use which - page.ts VS page.server.ts
-
Help with basic Supabase setup on Next.js?
seems like known issue https://github.com/supabase/auth-helpers/issues/497
-
Use base gotrue api instead of auth helper
auth helper for sveltekit: https://github.com/supabase/auth-helpers/tree/main/packages/sveltekit
- How to add protected routes with server components?
- Issues with Sveltekit and Supabase Authentication
-
What do you think about handling protected routes and redirects in middleware?
I do think checking auth in a server component would likely be better for your use here. Supabase has a nice example here: https://github.com/supabase/auth-helpers/tree/main/examples/nextjs-server-components They have a simple case with Middleware, but you wouldn't need to do it that way. Can use "redirect(/login)" from the server component.
What are some alternatives?
storage - S3 compatible object storage service that stores metadata in Postgres
sk-auth - Authentication library for use with SvelteKit featuring built-in OAuth providers and zero restriction customization!
Grafana - The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
sveltekit-prisma-example
DefinitelyTyped - The repository for high quality TypeScript type definitions.
nextjs-supabase - Multi-tenant NextJS 13 + Supabase
auth - A JWT based API for managing users and issuing JWT tokens
sveltekit-firebase9 - a simple todo app with sveltekit and firebase 9
supabase-nextjs-auth - Example project implementing authentication, authorization, and routing with Next.js and Supabase
supabase-auth-helpers - A collection of framework specific Auth utilities for working with Supabase. [Moved to: https://github.com/supabase-community/auth-helpers]
platforms - A full-stack Next.js app with multi-tenancy and custom domain support. Built with Next.js App Router and the Vercel Domains API.
tailwindcss-forms - A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.