nuxt-community / auth-module

Zero-boilerplate authentication support for Nuxt 2
https://auth.nuxtjs.org
MIT License
1.93k stars 922 forks source link

Compatibility with Nuxt 3? #1805

Open rahulmukati opened 1 year ago

rahulmukati commented 1 year ago

What is ETA of this module for Nuxt 3?

kissu commented 1 year ago

This one is still relevant: https://nuxt.com/docs/community/roadmap#%EF%B8%8F-roadmap

Please do not ask here every 2 weeks, the single source of true is the link given above. Splitting the info on several places will not help.

That issue can be closed I guess.

RadBe commented 1 year ago

Nuxt 3 was released 1+ year ago. Why are you so slow?

kissu commented 1 year ago

Hi @RadBe. πŸ‘‹πŸ» Please do consider that this module is far from being a priority. The team works hard on many things, but that one is not game-breaking since you can achieve the same feature thanks to composables. I'm pretty sure that you can find some articles on the subject.

Also, if you take into consideration the size of the current team, the resources are limited. You must choose which one you will ship first, getting out of RC was a priority.

The amount of work for an image, test, or 3rd party script management module is also quite bigger and less easy to implement. I don't have any stats but I guess that people would agree that not focusing on a module that could be homemade in 20 lines is less critical. Not considering bug-fixing.

So, I ask you to show some understanding. Maintaining an open-source project is a lot of work. People are human, please do not burden them if you have difficulties achieving specific things, because it's probably not their fault considering their bandwidth. πŸ€—

rahulmukati commented 1 year ago

It would be best if you had released this with at least some basic necessity modules (like auth). There are lots of people using Nuxt. Not all will get understand this thing they will have to do it on their own. It's good that you released it but its also affects people with extra burdens. Keep this in mind.

I am seeing many peoples not shifting to Nuxt 3 because of these basic things.

People are just stuck in between because now you can't even install Nuxt 2 freshly. It throughs a Fatal error while running.

Anyways, it's great to see you guys work so hard on so many things! I really appreciate your contributions to the world. No hard feelings! :)

kissu commented 1 year ago

I do agree with the fact that Nuxt3 is overall, more advanced and it can be a bit difficult to get some things done as a beginner. πŸ˜… Nuxt2 used to have a lot of auth questions too (regarding that same module), and I've answered quite a lot of them for sure. Nuxt3 is heavily embracing the Vue3 Composition API approach, hence why it is less beginner-friendly overall. You trade reusability over a "monolithic approach" if I might say (hear this.$auth in Nuxt2 vs useAuth in Composition API).

The fact that you need to use CAPI and the lack of a simple module to achieve those points (which can feel like a downgrade coming from Nuxt2) can indeed feel daunting. I do understand your point and feel the same myself on some parts. πŸ‘πŸ»

If you have an issue with Nuxt2, please open an issue on Stackoverflow or Nuxt's discord. I'll be happy to help. πŸ™πŸ» (the reason may be that you're using Node v18 rather than 16 IMO)

Thanks for the support Rahul, the team is indeed working quite hard! πŸ’ͺ🏻 We'll see if we can provide more material to beginners in the upcoming weeks/months.

exophunk commented 1 year ago

I understand that there is a lot of work to do and I do really appreciate your effort. But I dont understand how things are prioritized. There is no progress on this since the RC in april, while you work on gimmicks like image optimization.

It feels a bit that nuxt is stuck, as you most likely won't start a new project with nuxt2 and also nuxt3 is not in a state where you could build real-world production apps, as very fundamental modules are not ready and there is no ETA.

To me, authentification mechanisms are a core feature that any framework should be able to provide a safe abstraction layer. You are maybe right that it is possible to implement this yourself, but this is the sole reason keeping me from using nuxt 3.

Does anyone know of a tutorial/example how to add auth without the module, using composables? I can't find resources for nuxt3.

rahulmukati commented 1 year ago

Same, the core thing is missing and this iw keeping me too away from using Nuxt 3.

pabloveliz commented 1 year ago

I understand that there is a lot of work to do and I do really appreciate your effort. But I dont understand how things are prioritized. There is no progress on this since the RC in april, while you work on gimmicks like image optimization.

It feels a bit that nuxt is stuck, as you most likely won't start a new project with nuxt2 and also nuxt3 is not in a state where you could build real-world production apps, as very fundamental modules are not ready and there is no ETA.

To me, authentification mechanisms are a core feature that any framework should be able to provide a safe abstraction layer. You are maybe right that it is possible to implement this yourself, but this is the sole reason keeping me from using nuxt 3.

Does anyone know of a tutorial/example how to add auth without the module, using composables? I can't find resources for nuxt3.

+1 I'm just waiting for auth and pwa for start migrating. Will love to see a link that show us how to do this without the module in v3. That way we become less module dependant.

Also, thanks for the hard work you guys are doing.

kissu commented 1 year ago

Thank you all for your message. πŸ™πŸ»

You are very welcome to submit a discussion, send a message on Discord, ask some questions during conferences, you can also ping SΓ©bastien Chopin directly on Twitter (open DMs), etc... As you can see, plenty of places where you can ask/give feedback. πŸ‘πŸ»

I you want my opinion on the subject, the image module is quite a big deal. First of because it's complex and there is a LOT behind image optimization, you can't do that yourself. You will need informed and good developers to make a suitable + flexible solution. Nuxt was also quite about performance and DX. So I would not call it a gimmick. Also, the priority was to ship something as stable as possible, so fixing bugs/breaking changes was a big one too.

The changelog from the past few versions is quite significant as you can see. That, on top of a small team of humans with families (or bad things happening to some of them). If "Nuxt corp" was a huge company, the team would have far more bandwidth.

@exophunk which core modules are missing as of right now from your POV? @pabloveliz @rahulmukati which auth services/backends would you like to see in prior? JWT or Google login?x

An auth module takes quite a lot of time because you need to set up X backends, get some basic knowledge in a lot of languages, and manage all of them. You may give a try to sidebase/nuxt-auth, which seems to be serious. Otherwise, looking for a specific blog post with "Nuxt3 + [my-service-or-backend] auth" would probably provide some results. You can use useAuth or build something with some generic other composables (with cookies, middleware etc...). Most of the logic is built on the backend anyway.

The nuxt module wasn't doing a lot by itself but it was indeed quite handy. Having something homemade will take some effort and time but it is achievable thanks to Nuxt's middleware + reusable composables IMO. In the end, the auth module for Nuxt2 wasn't 100% flexible and some people just did their own thing because their setup was quite complex. Some others created a router guard and 2/3 conditions to have something basic.

Sorry for the frustration and difficulty to get something done easily. Nuxt3 is quite for advanced users due to the fact that it uses Composition API, that doesn't help and I do totally share your frustration myself. 😞

mrleblanc101 commented 1 year ago

@RadBe Nuxt 3 was released November 16 2022, exactly 14 days ago. Not 1+ year ago πŸ™ƒ Capture d’écran, le 2022-11-30 aΜ€ 16 48 06

kissu commented 1 year ago

@mrleblanc101 true, Nuxt RC1 was released on April 20, 2022, and even Vue 3.0 was released on September 20, 2020. We meanwhile understood that @RadBe is unhappy that things are not moving fast enough overall. But some context is given above, for plenty of possible valid reasons anyway.

Abdulrhman02 commented 1 year ago

so what is the current state can I use nuxt/auth in nuxt 3 project?

kissu commented 1 year ago

@Abdulrhman02 use the following.

The rest is still relevant and deserves a read if you want to get the details. πŸ‘πŸ»

Abdulrhman02 commented 1 year ago

@kissu I tried to use it but the documentation leave me with more questions

kissu commented 1 year ago

Not sure what to say to that tbh. πŸ˜‚ Which questions? What part of the documentation? What have you tried? Basically, can we get any more context on your situation?

Abdulrhman02 commented 1 year ago

tried to save my jwt and refresh it every 30 min and set the session to be 8 hours so the jwt will get refreshed until the session is over but I was stuck with the jwt saving part :)

kingakidi commented 1 year ago

@kissu I tried to use it but the documentation leave me with more questions

did you find solution ?

mtzrmzia commented 1 year ago

no ETA yet?

Hamed-kshiem commented 7 months ago

Any update on ETA compatibility?