realworld
auth-helpers
realworld | auth-helpers | |
---|---|---|
27 | 18 | |
2,165 | 886 | |
1.0% | 1.2% | |
5.0 | 8.3 | |
about 1 month ago | 7 days ago | |
Svelte | 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.
realworld
-
SvelteKit is awful for building PWAs
To illustrate my concerns, let's take the "Real World Example" that was made by the official Svelte Team in the official repository (https://github.com/sveltejs/realworld).
-
Top repos to study when learning SvelteKit?
I often end up looking at https://github.com/sveltejs/realworld when I want to check how SvelteKit apps are "supposed" to be built. It's maintained by the Svelte team so you can learn good practices there.
-
How do I know which is better for data fetching? (server / client side) supabase
I was looking at this a couple of hours ago and took a look at the realworld app app. I found all the fetch is done through the api, which is always called from server side. Even for user interaction, they always use forms to send the requests through the server.
- What should be improved about learning SvelteKit?
- Sveltekit with Python backend
-
Why use server routes in the realworld example
I was looking at the realworld example and noticed that to login, they send a POST request to auth/login. auth/login then puts the data in an user object and sends it to an external API.
-
fetch failed in endpoint - Svelte Kit
I'm pretty sure fetch is available for endpoints in latest version of svelte kit (older versions of svelte kit need to use node-fetch, updated svelte real world app has removed it as a dependency) but it's not working for me. Overview of my project files is below:
-
Good examples of svelte code
I’d recommend to take example from real world Svelte https://github.com/sveltejs/realworld
- Is there a tutorial for making a login page with SvelteKit ssr?
- Authentication using cookies+jwt?
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?
svelte-kit - Sveltekit Starter Boiler Plate with full user creation/authentication using JWT token
sk-auth - Authentication library for use with SvelteKit featuring built-in OAuth providers and zero restriction customization!
api.svelte.dev - The API worker source for https://api.svelte.dev
sveltekit-prisma-example
svelte-float-window - A Svelte Floating Window component.
nextjs-supabase - Multi-tenant NextJS 13 + Supabase
svelte-kit-cookie-session - ⚒️ Encrypted "stateless" cookie sessions for SvelteKit
sveltekit-firebase9 - a simple todo app with sveltekit and firebase 9
vue-svelte-size-analysis - Comparing generated code size of Vue and Svelte components
supabase-auth-helpers - A collection of framework specific Auth utilities for working with Supabase. [Moved to: https://github.com/supabase-community/auth-helpers]
Sapper - The next small thing in web development, powered by Svelte
tailwindcss-forms - A plugin that provides a basic reset for form styles that makes form elements easy to override with utilities.