-
I added JWT auth to my app, tried to follow your docs. I have a custom UserRepository and UserService class. I have this is application.ts:
Yet, when calling login I'm getting this error:
So even though I've bound my own implementation of UserService, it's still trying to use the default one for some reason. What's wrong here? MyUserService points to ./services/user-service.ts but it's not used for some reason. Any help please? I wanna use my own UserService and UserRepository. THanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The solution was to move the binding calls to the bottom of the constructor, after JWTAuthenticationComponent registration. There is only one call to:
Does it matter when do I call this function? I thought this is not important. Apparently, this has to be called after JWTAuthenticationComponent bindings are registered. I don't remember reading anything about this in the docs. What am I missing here? |
Beta Was this translation helpful? Give feedback.
The solution was to move the binding calls to the bottom of the constructor, after JWTAuthenticationComponent registration.
I don't get this.
There is only one call to:
this.bind(UserServiceBindings.USER_SERVICE)
Does it matter when do I call this function? I thought this is not important. Apparently, this has to be called after JWTAuthenticationComponent bindings are registered.
I don't remember reading anything about this in the docs. What am I missing here?