ConservationMetrics / map-packer

A Nuxt.js app to generate and manage offline map requests via mapgl-tile-renderer
MIT License
3 stars 0 forks source link

Upgrade to Nuxt 3 #33

Closed rudokemper closed 2 months ago

rudokemper commented 5 months ago

Optional (or for later work):

rudokemper commented 4 months ago

Status update: I am largely done with upgrade work on this branch and I was hoping to finish this week, but other priorities came to the fore.

I was thwarted by the fact that in spite of the existence of some Auth modules, there is no auth0 SDK for Nuxt 3 yet and the auth0 team reported only 9 days ago that there will not be until Q3 2024.

People are quite frustrated by this.

From research, it seems like some people have used Supabase and Lucia to handle auth0 for Nuxt 3, or created a bridge for a Next.JS package, but those seemed like heavy-handed or overly complex solutions.

One workaround I would like to try next is the solution offered here on Stackoverflow to instantiate the Vue3 package for Auth0 as a client side only Nuxt plugin.

rudokemper commented 4 months ago

Unfortunately, this workaround only worked client-side; I wasn't able to get the auth guard working in middleware. It seems like other approaches have run into similar issues - see the May 11 comment.

Rather than going down a customization rabbithole to try to get @auth0/auth0-vue working in SSR, I think I'd rather wait until there is an official auth0 workflow. There is a promise of this in that thread:

tyf Community Engineer 13d Hey all! Just a quick update here to share that an official Nuxt SDK is on the roadmap - While I’m unable to share an exact date at this time, the team plans to look at releasing a beta version of the SDK beginning in Q3 2024+.

Stay tuned!

Well, at least this application is basically ready to migrate to Nuxt 3 once that SDK drops!

rudokemper commented 2 months ago

At long last - I got nuxt-auth-utils working! :tada:

Just some kinks to be worked out with rerouting back to the /login page if a user is not approved in auth0, and a few more loose ends, and this branch will be ready to ship.

This means that we can start with Nuxt v3 for our new GC applications (e.g. admin_ui).

IamJeffG commented 2 months ago

Congratulations :-)