Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Please delay requesting an API token until one is needed

Offen
#709 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
ruby
Bereich
api, authentication

Rechercherichtung

Beginne damit, Auth0::Client.new bis zur synchronen Token-Anfrage nachzuverfolgen und die bestehenden Tests und das WebMock-Setup rund um die Instanziierung des Clients zu untersuchen. Die Änderung ist abgeschlossen, wenn das Erstellen eines Clients keine Netzwerkanfrage ausführt, während Vorgänge, die ein Token benötigen, weiterhin eines anfordern und durch Tests abgedeckt sind.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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

Vorherrschende Sprache
Ruby
Sterne
205
Forks
146
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus auth0/ruby-auth0

Alle Issues in auth0/ruby-auth0

Ähnliche Issues

Weitere Issues zu Ruby

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.