auth-helpers
auth-helpers | svelte-store | |
---|---|---|
18 | 13 | |
886 | 501 | |
1.2% | 2.4% | |
8.3 | 4.9 | |
9 days ago | 2 months ago | |
TypeScript | TypeScript | |
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.
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.
svelte-store
-
SvelteKit + Rust/Go Full-Stack Application, ready for anything (self promo)
Include https://github.com/square/svelte-store Include: https://www.skeleton.dev
- Anyone else use getters and setters for their stores?
-
Derived stores inside derived stores
worth looking at these too https://github.com/square/svelte-store
-
Extract reactive logic to re-use in other components
Amazing! Pretty much any time you want reactivity but don't want to write it inside a Svelte component, stores are what you're looking for. Check out Square's store library for async stuff too! https://github.com/square/svelte-store
-
Stores as fields
Use https://github.com/square/svelte-store as a drop-in replacement for the standard stores api and check out derived stores.
- Is there a better way to do this? Await initial value from store
-
@tanstack/svelte-query, @square/svelte-store or something else for server state/data management?
@/square/svelte-store I've seen somebody recommend it here but no comparison drawn with other solutions. There is also svelte-asyncable which also uses stores in a similar way.
-
PSA: Are you using @square/svelte-store?
I’ve been using it and abusing it for well over six months and if I didn’t have it I would need to build same with custom stores, soooo, do yourself a por favor and just use https://github.com/square/svelte-store from here on out!
- Firebase + Svelte Stores? What's your approach for connecting a database?
-
State Management Best Practices
Link for convenience. This looks really good actually, thanks for sharing!
What are some alternatives?
sk-auth - Authentication library for use with SvelteKit featuring built-in OAuth providers and zero restriction customization!
svelte-immer-store - Svelte Store contract for working with Immutable Immer Objects
sveltekit-prisma-example
nextjs-supabase - Multi-tenant NextJS 13 + Supabase
svelte-asyncable - Asyncable store for Svelte 3 which is store a value as promise.
sveltekit-firebase9 - a simple todo app with sveltekit and firebase 9
supabase-auth-helpers - A collection of framework specific Auth utilities for working with Supabase. [Moved to: https://github.com/supabase-community/auth-helpers]
rusve - Open source application build using SvelteKit and Rust as modules connected via gRPC.
tailwindcss-forms - A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.
Svelte - Cybernetically enhanced web apps