Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AcessToken.verify is not working #328

Open
dpmango opened this issue Apr 9, 2017 · 0 comments
Open

AcessToken.verify is not working #328

dpmango opened this issue Apr 9, 2017 · 0 comments

Comments

@dpmango
Copy link

dpmango commented Apr 9, 2017

Hey!
Im following the video guide pt.3 and spend some time figuring out why destroying access token return Your access token is invalid. no matter how hard I try.

I have used following DELETE request and token was valid and have all user attributes.
http://localhost:3000/api/access_tokens/1/?access_token=xxxxxxx

After going a bit deeper into code and loging params I found out that verify method gets undefined on logging into console params.auth.access_token

static verify(params, callback) {
    this.query()
      .join('user')
      .where({
         access_token: params.auth.access_token,
         expires_at__gte: new Date()
       })
     .........

Instead I managed my issue with modified params.body.access_token and therefore passing access_token as param.

      .where({
        access_token: params.body.access_token,
        expires_at__gte: new Date()
      })

Something to do with params.auth ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant