Feature: Provide example/SDK for server side authentication with Auth0 for Sveltekit
Description: There are no official SDK for handling server side authentication similar to your Next.js lib but for Sveltekit.
Feature: Provide example/SDK for server side authentication with Auth0 for Sveltekit
Description: There are no official SDK for handling server side authentication similar to your Next.js lib but for Sveltekit.
Welcome to the Auth0 Community and thanks for the request @lillheaton!
Please don’t forget to click the Vote button.
I’m out of votes otherwise I would upvote this! @lillheaton I was able to get it working with Sveltekit by using the openid client that the Next.js SDK uses under the hood and following what they did as a template. Happy to share/jam on the approach if it would be helpful.
It would be great to have a fully certified SDK for Sveltekit though!
Could you elaborate a bit more on your approach? Looking to do the same.
Sure. I can’t share my code directly here, but it’s almost identical to what Auth0 has done for Next.js: GitHub - nextauthjs/next-auth: Authentication for the Web.
I found the architecture diagram here most helpful: nextjs-auth0/ARCHITECTURE.md at main · auth0/nextjs-auth0 · GitHub
And the main entry points are login.ts
, callback.ts
, and logout.ts
here.
I’ve done something similar @aakashgoplani but much leaner and without SvelteKitAuth.
I have written a detail 16 chapter series on authentication in SvelteKit with Auth0 using SvelteKitAuth (NextAuth / Auth Js)