It seems that Auth0 is missing an official sdk for nuxt 3… or even nuxt at all.
I need to implement auth0 with nuxt 3 including server side rendering. So i already need to know on nuxt server if user is logged in and need to have the access token for api calls.
I wonder how to implement auth0 with nuxt 3. There is no sdk, there is no documentation, no example, no community comments about that.
Only thing i saw is Nuxt-auth Module · Nuxt which is some kind of wrapper around GitHub - nextauthjs/next-auth: Authentication for the Web. and somehow contains a provider for auth0. But with this it seems i cannot have my own login page and always need to use the one from the provider, also it seems it only works client side, but i need it both client and server side. Last but not least when integrating this module to my nuxt application the server crashes with
$fetch is not defined once i add the module to the application. so it seems to somehow conflicts with nuxt 3’s $fetch.
So i wonder if auth0 team or community can help with a guide for nuxt 3. Seems like there is an sdk for next.js since a while. Shouldn’t there also be one for nuxt.
Anyone out there managed to have auth0 with nuxt 3 application and server side rendering and custom login page?
So as you have researched we as Auth0 still don’t have an official SDK for NuxtJS but I highly encourage you to leave such feedback with context using our feedback category here:
but there were a few other users searching for that in the past so that might do the trick for now:
@konrad.sopala The solution this user post is referring to is for Nuxt 2. As we use Nuxt 3 we cannot use that solution. There is not yet an official nuxt 3 module for Authentication. It’s on Nuxt roadmap, but no one knows when it will be shipped. Only knowing there is not much focus on it. The only thing i found for Nuxt 3 is the community module of sidebase i mentioned in my entry comment, together with the mentioned issues so unfortunately it does not help.
Will write a comment to feedback category.
Currently only auth0 blocks the use of Nuxt 3 and this is extremely annoying
The first public beta of the Auth0 Nuxt SDK is now available for developers building web apps on the Nuxt framework!
Key Highlights
Idiomatic Nuxt 3 Experience: Simple, composable functions (useAuth0) that feel native to Nuxt developers, dramatically reducing time-to-first-login.
Advanced Security Out-of-the-Box: We’ve included support for the latest security standards from day one, including Pushed Authorization Requests (PAR), Rich Authorization Requests (RAR), and Backchannel Logout.
Powerful API Authentication: Seamlessly obtain tokens for backend APIs using the TokenVault integration.
Resources
Here are the helpful resources to explore the new Nuxt SDK and get started: