foundersandcoders / open-tourism-platform

An open platform to facilitate the creation of apps to promote local tourism and business in Nazareth
MIT License
17 stars 3 forks source link

should OAuth access_tokens have a client associated with them? #143

Closed mattlub closed 6 years ago

mattlub commented 7 years ago

it's not in the schema but looks like it could be because of the auth model

Do we need it? I would think so but obviously it works currently without...

mattlub commented 6 years ago

@Karyum (from your PR #176)

so did you have to add client to the Token schema in order for refresh tokens to work?

If so you can close this issue if that gets merged.

Karyum commented 6 years ago

@mattlub Yeah so every time that I would try to refresh the token and the client is not provided in the .populate of the getRefreshToken function it would give me this error {"error":"invalid_grant","error_description":"Invalid grant: refresh token is invalid"} im guessing it's looking through the client's object and looking through the grants array but can't find any, im not sure though.