loopback icon indicating copy to clipboard operation
loopback copied to clipboard

Users are created and authenticated in memory instead of oracle db

Open seanbrookes opened this issue 12 years ago • 1 comments

I have set up the user auth tokens and Angular services file to facilitate user registration and authentication but it seems to be working against the memory db instead of my oracle db.

I double checked and my User model is pointed at my oracleDB datasource.

My accessToken model was originally pointing to the memory 'db' datasource but I changed it to oracleDB but it doesn't seem to have made a difference.

When I run my app I am able to create new users and then I am also then able to log in with those users but if I restart my server the users are lost and I am unable to login.

I get the following error:

"Error: login failed
    at /Users/seanbrookes/_stacks/projects/bacn-icar/server/node_modules/loopback/lib/models/user.js:142:24
    at /Users/seanbrookes/_stacks/projects/bacn-icar/server/node_modules/loopback-datasource-juggler/lib/dao.js:590:66
    at /Users/seanbrookes/_stacks/projects/bacn-icar/server/node_modules/loopback-datasource-juggler/lib/dao.js:559:13
    at /Users/seanbrookes/_stacks/projects/bacn-icar/server/node_modules/loopback-datasource-juggler/lib/connectors/memory.js:195:13
    at process._tickDomainCallback (node.js:459:13)"

Using Node Inspector I was expecting the Model.prorotype.save method to be called in dao.js (loopback-datasource-juggler.js line: 690) but it doesn't seem to execute that code during registration.

seanbrookes avatar Jan 20 '14 19:01 seanbrookes

Released in 1.5.3

raymondfeng avatar Jan 24 '14 00:01 raymondfeng