Example of nextjs-auth0 working with Svelte's Sapper

Putzing around with using nextjs-auth0 SDK with Sapper. Here’s my repo, authentication branch:

Had to switch server to Express and pass headers through Sapper’s session argument in preload. API routes had to change to Sapper’s exporting format but otherwise the same code.

Running into some functionality where you can hit the back button after logging out and seeing the admin page. I think it’s a version served up by the service workers. Basically it’s not perfect yet but potential?

1 Like

Looks great! Thanks for sharing. I’m the person you talked to on twitter :smile:

Thanks for sharing Roshow. I think that would make a very good article/blog post on the Gotchas of NextJs and auth0. What do you think?

1 Like

Kinda held up because this won’t actually deploy correctly on now.sh for me. I use now-sapper to build. At first the error was no tslib dependency—it comes with next but not sapper so I added it. But now I’m getting a timeout and not specific details. Any thoughts?