server.injectConsentManager doesn't use ConsentRequestSQLManager even if *config.SQLConnection exists
When I was running multiple instances of hydra under reverse proxy server, often failed to get consent request with 404 error, then I found this issue.
Could you please the following diff? Is it a correct patch to fix the issue?
diff --git a/cmd/server/handler_consent_factory.go b/cmd/server/handler_consent_factory.go
index 17d0a2d..85dbe58 100644
--- a/cmd/server/handler_consent_factory.go
+++ b/cmd/server/handler_consent_factory.go
@@ -16,7 +16,7 @@ func injectConsentManager(c *config.Config) {
manager = oauth2.NewConsentRequestMemoryManager()
break
case *config.SQLConnection:
- manager = oauth2.NewConsentRequestMemoryManager()
+ manager = oauth2.NewConsentRequestSQLManager(con.GetDatabase())
break
case *config.PluginConnection:
var err error
Thank you!
Whoops, what a blunder! Would you mind creating a PR? :)
I fired up a quick pr myself: #618
@arekkas Thanks! Are you going to release 0.10.0-alpha.8 with this fix soon?
Yep, totally forgot about that one.
https://github.com/ory/hydra/releases/tag/v0.10.0-alpha.8
buildchain will take a while (~30min) as always