stormpath / loopback-stormpath

User authentication for Loopback made simple.
10 stars 1 forks source link

Error('Model not found: ' + modelName) #5

Open adriatic opened 9 years ago

adriatic commented 9 years ago

At the point That's it! You've now fully configured your Loopback project to work with Stormpath.

attempt to run the app (either as node . or slc run) the app crashes with the error shown in the issue title.

The same application without the replacement for User in the model-config.json with '''StormpathUser''' works just fine, so this problem seems to be caused by not having the user object present anymore.

adriatic commented 9 years ago

I solved this - it was a bad pair apiKeyId / apiKeySecret I inserted in the datasource.json file. One could say that the error message was misleading, but that is always the case when incorrect security credentials are used.

adriatic commented 9 years ago

Note: in the finished READ.ME file there is no need to replace the User object in model-config.json file with the StormpathUser object - it is of course sufficient to just change the datasource field to point to "stormpath" and define "stormpath" object in datasources.json file.