atinux / nuxt-auth-utils

Add Authentication to Nuxt applications with secured & sealed cookies sessions.
MIT License
962 stars 90 forks source link

Expose Oauth handlers as Nitro plugin ? #167

Open adrienZ opened 2 months ago

adrienZ commented 2 months ago

Today, handlers from src/runtime/server/lib/oauth are injected into the Nuxt context when the module is installed.

Would it be desirable to expand the scope of this package by providing those function directly in Nitro ? (i'm thinking Nitro plugin or direct import).

This would help other communities (vinxi, solid, analog, etc) and library authors to easily extend this fantastic package :)

Barbapapazes commented 2 months ago

Yes. I think it's a good idea. I'm working of a bunch of Nitro modules for the v3 but I think that we still need to wait for the v3 and the kit package.

see https://github.com/unjs/nitro/pull/2686#issuecomment-2305913286 for reference

And a module is more appropriate. https://github.com/unjs/nitro/pull/2508

adrienZ commented 2 months ago

Interesting, Nitro modules looks great indeed !

atinux commented 2 months ago

I think it would be even better to have h3-oauth exposing all our OAuth utils.