mohd7469 / oauth2orize-examples

Some oauth examples and implementation.
MIT License
230 stars 95 forks source link

bearer strategy with client Id calling wrong function #5

Open jcyh0120 opened 7 years ago

jcyh0120 commented 7 years ago

I accidentally miss saving my user.id, so the clientID is used for BearerStrategy and found this bug. I think in auth.js line 100 db.clients.findByClientId should be change with db.clients.find

gerges-beshay commented 7 years ago

The "id" stored in the token is the "client.clientId" not "client.id", that's why "db.clients.findByClientId" is used and not "db.clients.find" (now renamed to "db.clients.findById").

What is the issue you are having?