Sveltekit Integration

I’m facing the following problem. I love svelte and i want to implement it in production enviroments. Now we are using Auth0 for the serverless Functions security and some SPA.

But for security reasons i need to make an app as a SSR with an auth0 login, i already searched but dont find anu way to implement it on SvelteKit on a easy way.

So, the question is, there is a “recommended” way to use Auth0 on Sveltekit Backend, or its better to change my backend to .Net or Go and use SvelteJS alone?

Ok, i made an example app with Sveltekit and Auth0 following this instructions.

And it works, but the problem is that, as it says, it uses ‘@ auth0 / auth0-spa-js’, that is, SPA, when viewing the information in the browser, it shows it as is and that is what I want to avoid ( Cookies, local storage, etc).

[Image]

So my problem using this method is that I lose everything that is SSR, that is, for example, an httpOnly: true cookie, with all the information on the server side and not on the client side.

Maybe if i use this approach?

Hi @Svalinn,

Welcome to the Auth0 Community!

Unfortunately, we don’t have an official sveltekit example or SDK at this time. The closest thing I can suggest would be our nextjs SDK, but that is obviously not the same thing.

I found an unofficial Auth0/SvelteKit Client, but this is totally outside of Auth0 and is not verified by us in any manner. Regardless, it may be worth checking out/contributing to.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.