Overdrivr / micro-ci

Continuous Integration for embedded platforms
0 stars 0 forks source link

AccessToken is not persisted when a new user connects through OAuth #89

Closed Overdrivr closed 8 years ago

Overdrivr commented 8 years ago

Using the following middleware

app.use(function(req, res, next) {
  app.models.AccessToken.find(function(err, clients) {
    if(err) return next(err);
    console.log(clients);
    next();
  })
});

I discovered that no access token is persisted to the database. Bummer. Most likely, in server.js, app.models.Client.generateVerificationToken does not persist anything to the database, just generates a token.

Instead, client.createAccessToken must be used. This issue prevents from making any authenticated requests. Need to write a failing test for that, and to fix it!