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 started to customized the scaffold project adding loopback-component-passport and a basic user authentication system (I've already done directly in loopback and it works).
I added a new model in /common/models/user-credential.json like so
Even if the new "sources" field for passport is correctly defined when launching grunt or lb-ng I get an error that userCredential cannot be found.....
Any hint?
The text was updated successfully, but these errors were encountered:
I'm not able to reproduce this one. I feel like there's more to this configuration than just an npm i loopback-component-passport. Have you included any other packages or introduced any other code?
By simply scaffolding and adding this code to the common models I'm not experiencing any errors, but I'm not seeing any new functionality either, so I must be missing something.
I started to customized the scaffold project adding loopback-component-passport and a basic user authentication system (I've already done directly in loopback and it works).
I added a new model in /common/models/user-credential.json like so
{
"name": "userCredential",
"plural": "userCredentials",
"base": "UserCredential",
"properties": {},
"validations": [],
"relations": {
"user": {
"type": "belongsTo",
"model": "AppUser",
"foreignKey": "userId"
}
},
"acls": [],
"methods": {}
}
and updated model-config.json like so
{
"_meta": {
"sources": [
"loopback/common/models",
"loopback/server/models",
"../common/models",
"./models",
"./node_modules/loopback-component-passport/lib/models"
],
"mixins": [
"loopback/common/mixins",
"loopback/server/mixins",
"../common/mixins",
"./mixins"
]
},
"userCredential": {
"dataSource": "db",
"public": false
},....
Even if the new "sources" field for passport is correctly defined when launching grunt or lb-ng I get an error that userCredential cannot be found.....
Any hint?
The text was updated successfully, but these errors were encountered: