Checklist
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
Checklist
Describe the problem you'd like to have solved
Whenever a new
Auth0::Clientis 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.newthere 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