sourcefuse / loopback4-dynamic-datasource

This is a loopback 4 extension to connect to dynamic data sources runtime and maintaining old connections.
MIT License
30 stars 4 forks source link

The middleware should be invoked through the preinvoke chain #12

Open yeshamavani opened 7 months ago

yeshamavani commented 7 months ago

Is your feature request related to a problem? Please describe. Right now the middleware is being called through the default chain due to this it is being called before authentication and authorization in that case, we cant use CURRENT_USER to fetch and identify the tenantId of the user

Describe the solution you'd like change the chain of the middleware

yeshamavani commented 7 months ago

creating a separate middleware in the @sourceloop/core that will be a part of the preinvoke middleware chain and will call the action provider