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

Please delay requesting an API token until one is needed

Abierto
#709 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
45/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
ruby

Línea de trabajo

Comienza rastreando Auth0::Client.new hasta la solicitud síncrona del token e inspecciona las pruebas existentes y la configuración de WebMock relacionada con la instanciación del cliente. El cambio estará completo cuando construir un cliente no realice ninguna solicitud de red, mientras que las operaciones que requieran un token sigan solicitando uno y estén cubiertas por pruebas.

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

Descripción

feature request
Checklist
  • I have looked into the Readme and Examples, and have not found a suitable solution or answer.
  • I have looked into the API documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved

Whenever a new Auth0::Client is instantiated a synchronous call is made to auth0 to fetch a token. This causes headaches in specs because any time that we instantiate it we have to mock it out with webmock to prevent actual requests. If it were only fetched when required we could focus our mocks to just the areas of code that require it rather than anything that happens to trigger an object instantiation.

Describe the ideal solution

When I do Auth0::Client.new there are zero network requests made.

Alternatives and current workarounds

We are considering putting a global mock in for this which we are not happy with.

Additional context

No response

Lenguaje dominante
Ruby
Estrellas
205
Forks
146
Merge medio
16 h 2 min
PR fusionados (30 d)
5

Preparar el entorno

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 auth0/ruby-auth0

Todos los issues de auth0/ruby-auth0

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.