strongloop / loopback-example-passport

LoopBack example for facebook login
Other
185 stars 134 forks source link

Loopback Explorer 401 #2

Closed brianfeister closed 10 years ago

brianfeister commented 10 years ago

Sorry, still learning here, but I'm getting 401 from the loopback explorer with this project. Access Control is set to *, so I'm not sure the reason for the 401 response. What config is missing to enable it?

raymondfeng commented 10 years ago

Which model/operation do you try to invoke?

brianfeister commented 10 years ago

Happens for all of them, but /users specifically

Sent from my iPhone

On May 20, 2014, at 6:34 PM, Raymond Feng notifications@github.com wrote:

Which model/operation do you try to invoke?

\ Reply to this email directly or view it on GitHub.

raymondfeng commented 10 years ago

That's intentional. The user/userIdentity/userCredential models have default ACLs that prevent them from being accessed.

To override that, you can add the following to options object for models in models.json:

"acls": [
    {
      "principalType": "ROLE",
      "principalId": "$everyone",
      "permission": "ALLOW"
    }
brianfeister commented 10 years ago

:+1:

yagobski commented 10 years ago

I don't find models.json file. where is this file. Maybe in loopback 2.0 this file don't exist so what is the solution?

jacintoo commented 9 years ago

I have the same issue too, i added the codes to user/userIdentity/userCredential models but they didn't work still.. please help