4

I am migrating from Loopback 3 to 4.

The question is what do I do with my user model that was extended from the built-in User model. I tried to play with the model generator: lb4 model [options] [<name>] But there are no built-in models available as far as I can see.

I saw an example in the documentation where a user model was defined without a base model.

  • Is this the way to go?
  • How do I use the built-in user features like Login etc.?
VapoRizer
  • 341
  • 1
  • 5
  • 16

1 Answers1

4

According to https://loopback.io/doc/en/lb4/Understanding-the-differences.html#conceptfeature-mapping : Built-in models are only marked as TBD (To Be Developped?)...

Hope more is coming in an early future because I personally see no interest in migrating if the User model is not supported yet.


April 2019 Edit:

Not exactly a Built-in model, but the Loopback team added a reference implementation using JWT authentication in this github project shopping example.

They also worked on a more detailed design and started the implementation to enable extension points for plugging in different authentication strategies.


July 2019 Edit:

The authentication component has been refactored and the full documentation is available here: https://loopback.io/doc/en/lb4/Loopback-component-authentication.html

F3L1X79
  • 2,575
  • 2
  • 29
  • 45
  • 2
    I see. Thank you @F3L1X79. This seems odd to me, since LB3 is declared as EOL in December 2019. Also there is an authentication feature in the list you mentioned. But it is at the moment only a reference implementation. I appreciate your answer, but I will not mark it as accepted, since the problem still remains... you are waiting for clarification also AFAIU. – VapoRizer Jan 25 '19 at 17:36
  • There has been some news on this feature. I updated my answer accordingly. – F3L1X79 Apr 23 '19 at 08:28
  • Another update has been made, but I wish you good luck with the code implementation! – F3L1X79 Jul 08 '19 at 13:09
  • 1
    yeah, this is my second try to adopt lb4, but simply cannot handle all the learning curve to implement a simple behaviour like authentication and user model.... just adding simple task that was already in lb3 (like extending base user model that has password encryption built in)... is proving extremely difficult and challenging... so giving up until this is sorted and sticking with lb3 even for new applications – DS_web_developer Oct 05 '19 at 07:21