Skip to content

[Important] Auth Module State #893

Open
@pi0

Description

@pi0

Nuxt 3 support

Nuxt 3 comes with built-in utilities to support session and authentication. We are working on a new official module. Meanwhile, we recommend:

other solutions:


Idea of auth module started back into 2017 as a way to standardize API authorization flow with nuxt applications using store state (almost same time we introduced modules concept to nuxt it was one of examples). By the time passing usage of module and varieties went way further of what it was initially designed to be.

Having a provider agnostic auth module is a really complicated problem:

  • Every auth provider has specific requirements and setup even when following standards like Oauth2
  • Non implicit authentication flows require a backend API to be also configured properly (like laravel or passport)
  • There is still no standard way to have universal state for nuxt applications
  • Isomorphic http requests require properly configured endpoints for server-side rendering and proxy
  • With static generated websites, we need to partially hydrate on client-side
  • Documentation area needs more attention for each provider

Simply saying there was no solution (with current design) to make every project happy

By each of last five major releases, we tried to adopt with new requirements and nuxt updates but still module is buggy because of complexities above and legacy code-base and almost impossible to accept new contributions without breaking changes -- one fix break another usage.

With v5 project and HUGE help of @JoaoPedroAS51 we started with a major typescript rewrite to improve architecture of module. Yet still there are framework requirements to complete v5 rewrite:

  • Built-in support for API routes in Nuxt framework (WIP)
  • Standard way to handle sessions (@nuxt/session WIP)
  • Partially auth state hydration for SSGs

Considering current status, auth module is not a stable or well-documented solution but also it doesn't means project is forgotten. We are trying hard to fill in the gap for missing core components for v5.

Some alternative packages suggested to make your own auth solution:

Update: Status page added to docs https://auth.nuxtjs.org/status
Update: Thanks for all DMs for helping <3 Any help on docs is more than welcome via PRs

Regards and thanks for your patience 💚

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions