Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Support MFA in auth-redirect plugin

Abierto
#371 8 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
nuxt, supabase, typescript

Línea de trabajo

Empieza leyendo el comportamiento de redirección existente del plugin auth-redirect y la documentación enlazada de Supabase MFA, especialmente el paso challenge y el flujo de getAuthenticatorAssuranceLevel. Se considera terminado cuando una ruta opcional y configurable redirige a los usuarios de aal1 a aal2 cuando se requiere MFA, sin afectar a los usuarios que no lo necesitan.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement
Is your feature request related to a problem? Please describe.

I'm in the progress of setting up an MFA process to my app.
Obviously after setup, the MFA should (for users that have it enabled) require MFA right after login.

In my understanding of nuxt, this should be done as part of a (global) middleware - checking if the MFA challange is missing and redirecting the user to that location.

While the supabase documentation for this is pretty straightforward for setup - i think the "challange step to login" step is not - at least not how it's best implemented / enforced in a nuxt application.

Describe the solution you'd like

An (optional) feature added to auth-redirect which automatically redirects the user to a /mfa-challange route (obiviously configurable) if MFA is required (essentially, for the aal1-> aal2 step).

In my understanding so far, there could be a check of the "factors" array of the user object to check if 2FA factors are set up - and if they are, an additional call to supabase.auth.mfa.getAuthenticatorAssuranceLevel() can be made - which will determine if a redirect to /mfa-challange will be necessary.

Describe alternatives you've considered

Implement my own middleware to handle the same thing.
While this will certainly work - it'll mean there will be 2 handlers performing almost identical logic, which will certainly impact performance.
Considering this is also a security feature - it should probably not be left to every developer on it's own to figure out.

Lenguaje dominante
TypeScript
Estrellas
940
Forks
157
Merge medio
6 d 9 h
PR fusionados (30 d)
3

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de nuxt-modules/supabase

Todos los issues de nuxt-modules/supabase

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.