If a request comes in that is keyspace scoped before a database-scoped request has had chance to initialize the OIDC provider, the callback URL fails to build correctly, as we can't find {db} in the router path variable for the keyspace request.
We can't rely on h.db.Name as checkAuth runs before validateAndWriteHeaders has assigned h.db, so we'll have to check both router variables to build the callback URL.
If a request comes in that is keyspace scoped before a database-scoped request has had chance to initialize the OIDC provider, the callback URL fails to build correctly, as we can't find {db} in the router path variable for the keyspace request.
We can't rely on h.db.Name as checkAuth runs before validateAndWriteHeaders has assigned h.db, so we'll have to check both router variables to build the callback URL.