Questions tagged [loopback4]

Questions about LoopBack version 4. Use this tag for LoopBack questions which are specific to only version 4. General LoopBack questions should be tagged with loopbackjs.

Create powerful APIs easily with a new creation experience for defining REST APIs and handling API requests/responses.

A new, improved programming model with dependency injection and new concepts such as components, mixins, repositories, etc. make this the most extensible version yet.

See also

483 questions
1
vote
1 answer

Link single repo to Multiple Datasources -- Loopback 4

We are using Loopback 4 in our SaaS Application. We are stuck in one case. We are trying to have every user his own separate database. So when a user logs in the application we want to create a dynamic datasource, and that's what we have done. But…
Inyourface
  • 532
  • 4
  • 12
1
vote
1 answer

How to use createIndex with Loopback 4 mongodb connector for geolocation storage?

I am not sure where and how I can call createIndex or ensureIndex to ensure I have 2dsphere indexing on the associated mongo database upon application boot. Any pointers would be helpful.
Sudipta B
  • 51
  • 1
1
vote
2 answers

Add Request body Schema in loopback4

I'm new with loopback 4 and I really have difficulty with the documentation that is some time not up to date. I succeed to add an authentification system and a route to log in to the users. My problem is on the "/explorer" URL, I don't know how can…
Mathias Osterhagen
  • 402
  • 1
  • 3
  • 19
1
vote
1 answer

Loopback4 authorization user property role is always undefined

I have successfully implemented jwt auth in my lb4 app using custom service which implements userservice from @loopback/authentication-jwt. Everything is working fine for authentication. But when I go for authorization AuthorizationMetadata…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59
1
vote
1 answer

Loopback 4 authorization allowing access to all type of users

I am following this article for implementing authorization in my app. The user with the admin role can perform certain operations that other users can't. But it is not working. The controllers are accessible to all type of users Here is the…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59
1
vote
1 answer

How to implement chained models with loopback 4 without getting a Circular dependency

When models have circular dependencies Loopback reports an error. I am looking for a way to solve the issue without changing the models. If a model relates to itself the solution seems to be using Getter.fromValue(). However, when relations are…
1
vote
2 answers

Mixins in loopback4

I want to add createdAt and updatedAt to each model on loopback 4 can not find name 'MixinTarget'. Type parameter 'T' of exported function has or is using private name 'MixinTarget'. If I try from documentation above error occurs.
1
vote
1 answer

How to recreate 'dist' folder in Loopback 4

I'm working on another machine today. I've pulled my code from GIT and can see the project source files. But when running npm start I get the following error: Error: Cannot find module './dist' Require stack: - C:\project\code\server\index.js at…
John Tiggernaught
  • 758
  • 1
  • 6
  • 25
1
vote
1 answer

Loopback 4 authentication with firebase login

I have a frontend app with a firebase login that communicates with the loopback 4 server. Now I am trying to secure loopback 4 endpoints using authentication. I have seen a loopback 4 jwt authentication example but I don't have the password in my…
pratik jaiswal
  • 1,855
  • 9
  • 27
  • 59
1
vote
1 answer

How to make loopback 4 application authenticated with keycloak

How to use loopback4 application authentication strategy with keycloak or keycloak-connect . Keycloak provides steps w.r.t express application but would like to use it in loopback4. Ref :…
1
vote
2 answers

Loopback4 MongoParseError: URI malformed

There is no exception when I am trying without the Username and Password but I got error while giving value for user and password. The exception I got { "name": "Mongo", "connector": "mongodb", "url": "", "host": "127.0.0.1", "port":…
dpu_defcon
  • 31
  • 3
1
vote
2 answers

Does loopback 4 has embeds one and embeds many relations available?

I am migrating my LoopBack 3 application to LoopBack 4. in lb3 application i was using embeds one and embeds many feature in my model but unable to find same relation in lb4. By the documentation. it has yet to be implemented. Is the documentation…
1
vote
1 answer

Loopback4 hasMany, keyFrom can be array?

I am trying to use hasMany relationship in loopback. I have problem while using it. I have an array, which is contains to ids from target model and I want to find all elements belongs to that array and I want to list them. How can I do it? …
1
vote
1 answer

Can't register JWT authentication strategy in loopback 4

I'm using IBM loopback 4 and trying to secure some APIs using JWT, I've created all the required authentication components (sequence, strategy , component) in order to use the annotation @authenticate, but the application can't find the strategy…
Amine
  • 11
  • 3
1
vote
0 answers

Disable openapi spec validation in loopback

I'm looking for a way to disable openapi spec validation in Loopback 4. I'm still interested in keeping the swagger specs but I wish to replace the spec validation (body, params, query) with Joi. What I could achieve so far is validation from both…
Felix Movee
  • 326
  • 3
  • 11