You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on the Loopback-based project example "examples/multi-tenancy" and I managed to connect to different SqlServer databases successfully.
When I add jwt authentication provided by loopback in "How to secure your LoopBack 4 application with JWT authentication",
application.ts
```
// ------ ADD SNIPPET AT THE BOTTOM ---------
// Mount authentication system
this.component(AuthenticationComponent);
// Mount jwt component
this.component(JWTAuthenticationComponent);
// Bind datasource
this.dataSource(DbDataSource, UserServiceBindings.DATASOURCE_NAME);
this.dataSource(DbDataSource, RefreshTokenServiceBindings.DATASOURCE_NAME);
// ------------- END OF SNIPPET -------------
I get the following error:
Server is running at http://[::1]:3000
Try http://[::1]:3000/ping
Connection fails: TypeError: The "config.server" property is required and must be of type string.
It will be retried for the next request.
/home/daniel/Documents/dev/jscript/multi-tenancy-ds8/node_modules/tedious/lib/connection.js:121
throw new TypeError('The "config.server" property is required and must be of type string.');
^
TypeError: The "config.server" property is required and must be of type string.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello everyone,
I have been working on the Loopback-based project example "examples/multi-tenancy" and I managed to connect to different SqlServer databases successfully.
When I add jwt authentication provided by loopback in "How to secure your LoopBack 4 application with JWT authentication",
application.ts
// ------ ADD SNIPPET AT THE BOTTOM ---------
// Mount authentication system
this.component(AuthenticationComponent);
// Mount jwt component
this.component(JWTAuthenticationComponent);
// Bind datasource
this.dataSource(DbDataSource, UserServiceBindings.DATASOURCE_NAME);
this.dataSource(DbDataSource, RefreshTokenServiceBindings.DATASOURCE_NAME);
// ------------- END OF SNIPPET -------------
Server is running at http://[::1]:3000
Try http://[::1]:3000/ping
Connection fails: TypeError: The "config.server" property is required and must be of type string.
It will be retried for the next request.
/home/daniel/Documents/dev/jscript/multi-tenancy-ds8/node_modules/tedious/lib/connection.js:121
throw new TypeError('The "config.server" property is required and must be of type string.');
^
TypeError: The "config.server" property is required and must be of type string.
Beta Was this translation helpful? Give feedback.
All reactions