Open md-ray opened 7 years ago
You must have
accessTokenExpiresAt: { type: Date },
defined in your OAuthTokens
model
'accessTokenExpiresAt' is being stored as 'expires'. Modify the getAccessToken method in mongo-models.js and add this line in "then" callback:
token.accessTokenExpiresAt = token.expires;
I'm just putting my solution here if anyone with a similar problem stumbles upon it. All of the values in my token sql table were seperated by an underline. The return here expects the values to be in camelCase. Hope this helps someone!
Hi, I've successfully get access token using Password Grant. When I try to use the access token to access secured pages, I got this error: { "statusCode": 503, "status": 503, "code": 503, "message": "Server error:
accessTokenExpiresAt
must be a Date instance", "name": "server_error" }I'm using this library with Mongo Model, using Dockerized Mongo DB Version 3.4.4
Any idea how to solve this?