your previouis answer:
@jmanno01 I have not identified any issue yet. Perhaps you should look at your keyfunc.Options{} to see if too many requests are allowed. Try lowering RefreshTimeout, increasing RefreshRateLimit, ensure RefreshErrorHandler is not blocking, setting RefreshUnknownKID to false, etc.
https://pkg.go.dev/github.com/MicahParks/keyfunc#Options
If you can make a full working proof-of-concept program or provide a different way to reproduce the behavior, I can help further. Not enough information has been given to help.
Answer:
thanks for the feedback, ahaha i wish i could provide a poc to you
where RefreshInterval: time.Minute *10, RefreshTimeout: time.Second *10,
RefreshErrorHandler: func(err error) { log.Error("cannot fetch JWKS: ", err)) }, spit out any error that may occur and not providing the RefreshUnknownKID is setting the variable to false by default right?
so those values should changed to prevent this error :
// If the j.refreshRequests channel is full, return the error early. return nil, ErrKIDNotFound
Hi @MicahParks hope you are doing well,
your previouis answer: @jmanno01 I have not identified any issue yet. Perhaps you should look at your keyfunc.Options{} to see if too many requests are allowed. Try lowering RefreshTimeout, increasing RefreshRateLimit, ensure RefreshErrorHandler is not blocking, setting RefreshUnknownKID to false, etc. https://pkg.go.dev/github.com/MicahParks/keyfunc#Options
If you can make a full working proof-of-concept program or provide a different way to reproduce the behavior, I can help further. Not enough information has been given to help.
Answer: thanks for the feedback, ahaha i wish i could provide a poc to you
this is the way I init the
jwks
:where
RefreshInterval: time.Minute *10
,RefreshTimeout: time.Second *10
,RefreshErrorHandler: func(err error) { log.Error("cannot fetch JWKS: ", err)) },
spit out any error that may occur and not providing theRefreshUnknownKID
is setting the variable to false by default right?so those values should changed to prevent this error :
// If the j.refreshRequests channel is full, return the error early. return nil, ErrKIDNotFound